pages communication in a portlet

Hi Guys,

I am trying to get an idea of what would be the best approach to tackle below use case.

Use case

  1. I have a portlet (say Portlet X) where in two portlet pages are imported into it (Say Page A and Page B)
  2. I have all the editable options on Page A, and it’s relevent read only options on Page B
  3. When user edits a field on Page A, the action present in Page A’s backing bean will be invoked to make the relevent update in database.
  4. Now I would like to see the updated data for this field in Page B. To do this, I would need to invoke an action in Page B (to get the updated data from database) and refresh Page B.

Can you please advise how can step 4 be achieved?

I have an approach but I don’t feel it is optimum as it involves invoking async command controls twice.
At step 3 - after Page A’s backing bean action is invoked, in the action command listener - invoke a javascript function present in Page B. That javascript function from Page B invokes server side action and refreshes controls on Page B.

Kind regards,

If you have control over the rendering of the link that does the navigation to the second page, then you can utilize the “Portlet Simple Link” control to perform an action request the executes an action that you specify on a portlet in the target page before the page is rendered.