I have a base class, which is normal Java class. Three subclasses extend it which are @ViewScoped beans. There’s a facelet using a dynamic variable. I have three xhtml pages which use this facelets with the three beans viz. bean1, bean2 and bean3 which are dynamically included in a rich:tab component on a main page.
So far so good. But on every page there are a few popups which should refer to the current bean. And since those popups need form tag inside them, I have included them outside the main page’s form tags in order to avoid nested form tags. Now I want the popup to refer to current bean (bean1, bean2 or bean3, depending upon from where the popup is called) in question. How do I achieve this?
I have a base class, which is normal Java class. Three subclasses extend it
Share
Try something like this:
Add a new bean (
popupBean) that will contain reference to current bean in popup.Add an action that will set needed bean as property of
popupBean. Example:Use
showattribute ofrich:popupPanelto show the popup: