Defined one Generic portlet (let’s say Page1)with it’s scope as ‘session’ and set ‘Expire with page flow’ property to true.
In Page1, there is one button, on click of this button, going to Page2 by passing request parameter hiddenRequest setting to true.
Page2 has scope ‘session’ and set ‘Expire with page flow’ property to true.
Page2 in turn has a link to go back to Page1.
As page1 has scope ‘session-expire with page flow’, I am expecting Page1 managed bean to be reinitiazlied whenever I click the link in Page2. But it is not happening.
If I remove hiddenRequest request parameter when moving to Page2 from Page1, then on click of link in Page2, it is rightly reinitializing Page1 managed bean.
Could you please let me know why Page1 is not being reinitialized every time on click of link in Page2, if I use hiddenRequest parameter when going to Page2?
I’m sorry that it has taken me so long to reply… It has been a busy few weeks… Anyway, the sample you sent was brilliant. Thank you for doing that… It really helps to have a small concise example of what you are trying to accomplish.
The key to what you need to do is use the PortletLink and ExtendedPortletURL. Those controls allow you to ResetState on one or more portlets on the target page. You can also use those controls to invoke methods on the portlets and other activities.
Please see the attached update to your sample. Also please note that i’ve defined a couple of pages via xmlImport so the links can work properly.
I tried importing the attached package to my workspace. It is failing to upload to my workspace and giving Invocation Target Exception. I am using Designer Version 7.1.2.
I will try using porletURL and ExtendedPortletUrl.
Btw, could you please let me know if I can find documentation for hiddenRequest parameter anywhere?
I still didn’t understand what went wrong in using hiddenRequest parameter, because of which the managed bean is not getting reinitialized though pageflow property is set to true.
Does hiddenRequest parameter has additional control over the managed beans to override the existing managed bean properties?
Sorry about the version issue. I’m using an 8.0.2 version of Designer. However, you should be able to open the .view file and copy and paste the controls into your 7.x version.
I’m loathe to document hiddenRequest, because it is an internal feature that i can’t guarantee we will continue to use/support or change.
Additionally, i think that your scenario is more appropriately handled by using the PortletURL and ExtendedPortlet URL controls.
I couldn’t check the feasibility of using ExtendPortletURL and portletURL (This is because, we are opening child windows by passing the URL to window.open method) in our application, will give you an update as soon as I check it.