Sunday, November 25, 2012

Dynamic include with richfaces popupPanel

this post is to show how to dynamically include a page popupPanel when open, and remove the included page when closed.

The purpose to use dynamic include in popupPanel  are to avoid mandatory validation inside the popup, and to reduce the component tree size, thus reduce the network bandwidth.

1. create a placeholder in managedBean.
2. create a addIncludeUrl method in manageBean
3. create a hideIncludeUrl method in managedBean

1. create a <a4j:jsFunction /> to invoke the addIncludeUrl method
2. create a <a4j:jsFunction /> to invoke the removeIncludeUrl method
3. create a content xhtml to be included in the popupPanel
4. create a popupPanel
5. create a <ui:include /> in the popupPanel to dynamically render the content xhtml

6. create a <a4j:commandButton /> or <a4j:commandLink /> to invoke the popupPanel


How to create wizard with dynamic include in JSF is another example on using dynamic include.

1 comment:

  1. Any Working Example please share it I have Parent Window and Child WIndow WHich is used for popup code how this code will work on that situation?



Related Posts Plugin for WordPress, Blogger...