Navigation with popup
<navigation-rule>
<from-view-id>/ejemplo1.jspx</from-view-id>
<navigation-case>
<from-outcome>dialog:abrirPopup</from-outcome>
<to-view-id>/ejemplo2.jsxp</to-view-id>
</navigation-case>
</navigation-rule>
Like any other rule of navigation, when executing a method and giving back a string like “dialog: abrirPopup” will redirect us to this page, but this time like a popup.
AdfFacesContext().getCurrentInstance().getProcessScope().put ( " key " , " objeto " );
AdfFacesContext().getCurrentInstance().getProcessScope().get( " key " );
The only thing that we would have left to do would be to associate a property to him to the button that is going to open popup:
useWindow = true;
This way we would have created simple popup in our page. Average ones exist other to be able to pass values to him to popup, and would be associating an event to him of type launchEvent to the button, and the only thing that would be to do is to capture the component and to pass the values to him of way to similiar to since we have explained previously. The problem to this is that sometimes, we want that according to that type of condition is made in the method associated to the event makes a navigation or another one, or that does not open any popup.
It can happen that we have in the event a condition that according to the size of a list, is sent to popup certain values to him, our intention would be that if that list is empty not sends popup but that is sent a message to the FacesContext. The parameters would be associated acceding to launchEvent, gathering the component and executing the method getDialogParameters().put (…);
Tags: Java ServerFaces