Bug 1032715 - Provide functionality to reset the portlet view
Provide functionality to reset the portlet view
Status: NEW
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal (Show other bugs)
6.1.0
Unspecified Unspecified
high Severity high
: ER01
: ---
Assigned To: Default User
Marek Baluch
6_3
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-20 11:13 EST by Martin Weiler
Modified: 2016-10-30 18:59 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previous versions of PortletBridge could not reset the state of a JSF portlet to it's default state. In cases where the navigation was contained inside a JSF portlet, the navigation could not be reset until the session expired. The fix includes PortletBridge 3.3.1 in this release of JBoss Portal, which correctly returns a JSF portlet to it's default state when required. This behavior is documented in the PortletBridge project at https://docs.jboss.org/author/display/PBR/Save+Bridge+Request+Scope+after+Render+complete
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Enhancement
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Weiler 2013-11-20 11:13:59 EST
Description of problem:
As per the spec, the portal maintains the state across requests, unless explicitly reset. For portlets composed of multiple views, this means that the portlet presents the last view, when a user returns to the portlet from a different page. Resetting the state and presenting a default view instead is a commonly requested feature.
Comment 2 Lucas Ponce 2014-02-18 09:30:24 EST
Hi Martin,

Please, can you add more details to the request ? Do you mean ... ?

a) Portlets based in PortletBridge JSF, to reset the JSF state to return to default view.

b) Pages with multiples portlets, each one with one state (i.e. EDIT mode and maximized), and reset portal page state.

c) Both cases ?

Thanks,
Lucas
Comment 3 Lucas Ponce 2014-02-18 09:48:52 EST
Ken has pointed that JBoss Portal 6.1.1 will include PortletBridge 3.1.1 with a feature to not retain state (in other words to set the view for JSF portlets):

https://docs.jboss.org/author/display/PBR/Save+Bridge+Request+Scope+after+Render+complete
Comment 4 László van den Hoek 2014-02-18 10:23:36 EST
(In reply to Lucas Ponce from comment #3)
> PortletBridge 3.1.1

Surely you mean PortletBridge 3.3.1? The version included with JPP 6.1.0 is 3.2.1.
Comment 5 Lucas Ponce 2014-02-18 10:26:50 EST
PortletBridge 3.3.1

Sorry, I had a typo in my previous comment.
Comment 6 Martin Weiler 2014-02-18 10:30:32 EST
Lucas,
the request was for scenario a), which is covered with the new PBR bridge feature. Feel free to close this bz.
Comment 8 Petr Mensik 2014-05-12 04:48:30 EDT
Yes, I can verify that this feature of PBR is really working.
Comment 10 Petr Mensik 2014-09-10 09:54:27 EDT
Based on the report from Anurag, I have to confirm that it seems PBR retains the state of JSF portlets again no matter what configuration you have.

Steps to reproduce (you can use reproducer provided by Anurag)

1. Deploy portlet
2. Add it to some page and go to there
3. Fill something into the input and submit, now you are on the step 2
4. Go to some other page
5. Go back to the page with reproducer, portlet should have reset the view into its initial state but you can still see the step 2 hanging there
Comment 11 Petr Mensik 2014-09-18 08:55:02 EDT
So I managed to test it with older versions and result is still the same. I made a reproducer from one of the example portlets in PBR, so you can check it for yourself in earlier version of JPP

https://github.com/pmensik/portletbridge/tree/BZ-1032715_reproducer

I also have added integration test into the PBR testsuite and strange thing is that it passes (I mean you leave the portlet in step two, go to some url, go back and portlet shows you the homepage), you can check it in the other branch of my fork

https://github.com/pmensik/portletbridge/tree/BZ-1032715

Just do mvn verify -P browser-phantomjs,integration-tests,jbossas-managed-7 -Dtest=RequestScopeRetainingTest
Comment 14 Ken Finnigan 2014-09-29 07:57:49 EDT
The resolution in comment #3 refers to PBR-499, which is related to state being retained between requests when it shouldn't.

This BZ relates to resetting the view id of a portlet, and is unrelated to whether state is being retained between Render requests or not.

Note You need to log in before you can comment on or make changes to this bug.