Currently facing problem in refreshing the Parent Form from some other form . The project has been designed in the following way :
We have a CAF Portlet Project 1 where we have a Portlet 1 . Then we have a CAF Portlet Project 2 where we have Portlet 2 and along with this we have multiple views along with default view containing modal dialog box in all of them . In Portlet 1 we have included Portlet 2 and trying to display various modal dialogues belonging to Portlet 2 by calling the async hidden buttons present in the default view of Portlet 2.
Our issue is that we are unable to refresh the Parent form( basically the Portlet 1 ) when we close the modal dialog box belonging to Portlet 2 . Is there anyway we could achieve this by going forward with this Architecture ?
This is amazing thank you for that sample portlet and for your time , it is good to know how this could be done when a Portlet Project contains multiple Portlets and we could refresh one another Portlets from each of them .
Could this same logic work , when i have two Portlet Projects say Portlet Project one containing Portlet 1 and Portlet Project 2 containing Portlet 2 and i try to acheive this refreshing across Portlet Projects ?
Yes the ‘External Portlet Reference’ determines what to refresh by resolving the URI or alias of the target portlet instance, so it can locate a control to refresh from any CAF project that is deployed to MWS.
Now my scenario is like i have a Portlet Project 1 having Portlet 1 , Portlet Project 2 having Portlet 2 and Portlet Project 3 having Portlet 3 . The Portlet 3 is included in the Portlet Project 1 and Portlet Project 2 as well. In my application i show Portlet 1 for a specific role say “X” and Portlet 2 for a specific role say “Y”. So when i refresh from Portlet 3 which is included in both the other Portlets i.e. Portlet 1 and Portlet 2 how could i achieve refresh of only individual ones ( since Portlet 1 displayed to role X and Portlet 2 displayed incase of role Y) ? Could this be acheived ?
For simple conditional logic, you can bind the “Refresh” property of the command button to a conditional expression that could calculate what to refresh based on your role.
For example using the ternary operator to do an “condition ? value_if_true : value_if_false” statement like this:
Of if your logic becomes more complex, you can do the calculation in a java method in your page bean and bind the “Refresh” property to that java method.