Bug 793905 (JBEPP-977) - PortletModes and WindowStates are not properly broadcasting events in webui.
Summary: PortletModes and WindowStates are not properly broadcasting events in webui.
Keywords:
Status: VERIFIED
Alias: JBEPP-977
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal
Version: 5.1.0.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.1.CR02
Assignee: Nobody
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-13 19:04 UTC by Gary Hu
Modified: 2020-04-27 01:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-23 11:56:39 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEPP-977 0 Major Closed PortletModes and WindowStates are not properly broadcasting events in webui. 2017-03-20 22:25:09 UTC

Description Gary Hu 2011-06-13 19:04:34 UTC
Affects: Release Notes
project_key: JBEPP

This issue was originally raised in the Portlet Bridge jira https://issues.jboss.org/browse/PBR-263.

The window state doesn't seem to be functioning correctly when using Richfaces strategy. The same issue doesn't occur if disable Richfaces by removing Richfaces jars and settings in the deployment descriptors.

You can find the test WARs that could demonstrate the issue from https://issues.jboss.org/browse/PBR-263. There are two WARs attached there.
The jsfWindowStateTest.war is a pure jsf application without Richfaces and works fine without issue. The RFPortletTest.war is a Richfaces application which runs into this issue. The java source codes are included in the WEB-INF/classes folders.

There are 3 pages(page1, page2 and page3) in the tests. If I go from page1 to page2 by setting the window state as MAXIMIZED, it works well to make it MAXIMIZED on the page2. Then I set the window state as NORMAL or MINIMIZED to navigate to page3. However, the page3 stays MAXIMIZED. This could be demonstrated more clearly by adding two or more portlets to the same page. The MAXIMIZED portlet will be showing on the page and the other pages are invisible. If you refresh the page it shows the expected window state, NORMAL or MINIMIZED.

I'm using the following code to set the window state.

javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
javax.portlet.PortletResponse response = (javax.portlet.PortletResponse) context.getExternalContext().getResponse();
javax.portlet.ActionResponse actionResponse = (javax.portlet.ActionResponse) response;
try {
if("maxmized".equalsIgnoreCase(this.windowState)) { actionResponse.setWindowState(javax.portlet.WindowState.MAXIMIZED); }
else if("normal".equalsIgnoreCase(this.windowState)) { actionResponse.setWindowState(javax.portlet.WindowState.NORMAL); }
else if("minimized".equalsIgnoreCase(this.windowState)) { actionResponse.setWindowState(javax.portlet.WindowState.MINIMIZED); }

} catch (javax.portlet.WindowStateException e) { // TODO Auto-generated catch block e.printStackTrace(); }

I also tried to append the parameter javax.portlet.faces.WindowState to the navigation url but got the same outcome.
for example:
<navigation-rule>
<navigation-case>
<from-outcome>page1</from-outcome>
<to-view-id>/pages/page1.xhtml?javax.portlet.faces.WindowState=minimized</to-view-id>
</navigation-case>
</navigation-rule>

Comment 1 Gary Hu 2011-06-13 19:05:34 UTC
Security: Removed: RHT+eXo Added: Public


Comment 2 Matt Wringe 2011-06-15 22:01:59 UTC
This issue has been fixed in GateIn trunk. Please see GTNPORTAL-1935 for more details and the patch used to fix the problem.
Someone will need to review the patch for inclusion in EPP

Comment 3 Matt Wringe 2011-06-15 22:01:59 UTC
Link: Added: This issue is related to GTNPORTAL-1935


Comment 4 Prabhat Jha 2011-06-21 02:38:19 UTC
Hi Gary, is a patch jira already in progress?

Comment 6 Jared MORGAN 2011-11-16 22:29:00 UTC
Release Notes Docs Status: Added: Needs More Info
Release Notes Text: Added: CAUSE:

CONSEQUENCE:

FIX:

RESULT:
Primary SME: Added: theute
NEEDINFO: Removed: Nobody Added: Subject Matter Expert


Comment 8 Thomas Heute 2011-11-28 09:35:43 UTC
Release Notes Docs Status: Removed: Needs More Info 


Comment 10 Jared MORGAN 2011-12-13 22:31:14 UTC
Release Notes Docs Status: Added: Not Required
NEEDINFO: Removed: Subject Matter Expert 
Affects: Added: Release Notes


Comment 12 hfnukal@redhat.com 2012-04-11 08:55:52 UTC
Fixed with revision: 8682

Comment 13 vramik 2012-04-15 21:42:18 UTC
This is fixed in EPP5.2.1.cr02. I deployed RFPortletTest.war and add two portlets to the same page. Then I went to page2 by setting the window state as MAXIMIZED, 
the portlet was MAXIMIZED. Then I set the window state as NORMAL to navigate to page3 and portlet was in NORMAL state (both portlets presented).


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