0

Is there any possibility to do this call from my action return?

For example:

public String myActionMethod() {
     // do some stuff here..

     return "Richfaces.showModalPanel('myModal')";
} 
kolossus
  • 20,559
  • 3
  • 52
  • 104
rodrigocprates
  • 498
  • 6
  • 22
  • I don't know whether it is possible. However if you describe your requirement someone may show you a workaround. – prageeth Nov 08 '12 at 03:47

1 Answers1

0

If conditionally showing the modal panel is your main requirement, look into the showWhenRendered(show in RF4.x popupPanel) attribute of the richfaces modalPanel component. Bind the showWhenRendered attribute to a boolean value in the backing bean and set the value to reflect the decision to display the popup.

To reflect changes on the modalPanel however, it is advisable to encase the modalPanel itself in an <a4j:outputPanel layout="none"/> container and then reRender that panel between requests. For Richfaces 3.3 at least, reRendering dynamically displayed components doesn't work that well if it's not encased in another <a4j:outputPanel layout="none"/>.

Besides the above, I'm not aware of Richfaces explicitly providing server-side remoting of client-side components (like Primefaces does with the RequestContext object)

kolossus
  • 20,559
  • 3
  • 52
  • 104
  • im using RF 3.x. I choose to use conditional oncomplete with EL, then in my action I just set my oncomplete needs on my backing bean attribute. thanks for your explained response! – rodrigocprates Nov 08 '12 at 11:47