ICEfaces
  1. ICEfaces
  2. ICE-7191

Develop portlet version of latest ACE showcase application

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 3.0
    • Component/s: ACE-Components, Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 2 portlet portal
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration

      Description

      Need to develop a version of the latest ACE showcase that runs in portal containers.

        Issue Links

          Activity

          Deryk Sinotte created issue -
          Deryk Sinotte made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 2.1 [ 10241 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial]
          Assignee Priority P2
          Assignee Deryk Sinotte [ deryk.sinotte ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #25458 Mon Sep 12 16:13:30 MDT 2011 deryk.sinotte ICE-7191: adjust Comp Suite example to allow for portlets to specify menu and example parameters
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/build/common-portlet.xml
          Hide
          Deryk Sinotte added a comment -

          I've checked in an initial version of the files required to build a portlet version of the Component Suite application. This includes Ant and Maven build files. The portlet and Liferay configuration files are also included and I've set up 2 of the portlets for deployment - ACE Buttons and ACE Accordion Panel (both which appear to work).

          There is still a fair amount of work to do, including:

          • finishing the configuration files for all portlets
          • fixing the menus to prevent full page navigation
          • adjusting the styling so that the portlets fit more effectively on the page

          There will be other issues related to actual functioning of the portlets but we can create separate JIRAs for these as needed.

          Show
          Deryk Sinotte added a comment - I've checked in an initial version of the files required to build a portlet version of the Component Suite application. This includes Ant and Maven build files. The portlet and Liferay configuration files are also included and I've set up 2 of the portlets for deployment - ACE Buttons and ACE Accordion Panel (both which appear to work). There is still a fair amount of work to do, including: finishing the configuration files for all portlets fixing the menus to prevent full page navigation adjusting the styling so that the portlets fit more effectively on the page There will be other issues related to actual functioning of the portlets but we can create separate JIRAs for these as needed.
          Hide
          Deryk Sinotte added a comment -

          Checked in updated configuration files so that all ACE and Compat examples are now available as portlets. In addition to the styling work above, there are some issues around non-portlet friendly classes/methods used in a couple of the examples (e.g. HttpSession). Details to be provided shortly.

          It also appears that there is some YUI 3 code being used. This is a known conflict with Liferay's YUI usage and causes problems (like disabling the Liferay menus).

          Show
          Deryk Sinotte added a comment - Checked in updated configuration files so that all ACE and Compat examples are now available as portlets. In addition to the styling work above, there are some issues around non-portlet friendly classes/methods used in a couple of the examples (e.g. HttpSession). Details to be provided shortly. It also appears that there is some YUI 3 code being used. This is a known conflict with Liferay's YUI usage and causes problems (like disabling the Liferay menus).
          Deryk Sinotte made changes -
          Link This issue depends on ICE-7226 [ ICE-7226 ]
          Hide
          Deryk Sinotte added a comment -

          Going through the components now looking at more individual problems:

          I've already created ICE-7226 to cover the use of non-portlet friendly API usage. Temporarily fixing that reveals another issue. When I click to export the table, the PortletFaces Bridge throws this:

          21:36:33,672 ERROR [ExternalContextImpl:301]
          java.lang.NullPointerException
          at org.portletfaces.bridge.context.ExternalContextImpl.encodeBookmarkableURL(ExternalContextImpl.java:260)
          at com.sun.faces.application.view.MultiViewHandler.getBookmarkableURL(MultiViewHandler.java:363)
          at com.sun.faces.renderkit.html_basic.OutcomeTargetRenderer.getEncodedTargetURL(OutcomeTargetRenderer.java:166)
          at com.sun.faces.renderkit.html_basic.OutcomeTargetLinkRenderer.renderAsActive(OutcomeTargetLinkRenderer.java:154)
          at com.sun.faces.renderkit.html_basic.OutcomeTargetLinkRenderer.encodeBegin(OutcomeTargetLinkRenderer.java:92)
          at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820)

          The current way we are doing the exporting is not working in the portlet. The portlet lifecycle has a stricter division between various types of requests (Action vs Event vs Render vs Resource) and I believe the current failure is related to the Export button being triggering an Action when what we may really want is a Resource.

          Show
          Deryk Sinotte added a comment - Going through the components now looking at more individual problems: I've already created ICE-7226 to cover the use of non-portlet friendly API usage. Temporarily fixing that reveals another issue. When I click to export the table, the PortletFaces Bridge throws this: 21:36:33,672 ERROR [ExternalContextImpl:301] java.lang.NullPointerException at org.portletfaces.bridge.context.ExternalContextImpl.encodeBookmarkableURL(ExternalContextImpl.java:260) at com.sun.faces.application.view.MultiViewHandler.getBookmarkableURL(MultiViewHandler.java:363) at com.sun.faces.renderkit.html_basic.OutcomeTargetRenderer.getEncodedTargetURL(OutcomeTargetRenderer.java:166) at com.sun.faces.renderkit.html_basic.OutcomeTargetLinkRenderer.renderAsActive(OutcomeTargetLinkRenderer.java:154) at com.sun.faces.renderkit.html_basic.OutcomeTargetLinkRenderer.encodeBegin(OutcomeTargetLinkRenderer.java:92) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) The current way we are doing the exporting is not working in the portlet. The portlet lifecycle has a stricter division between various types of requests (Action vs Event vs Render vs Resource) and I believe the current failure is related to the Export button being triggering an Action when what we may really want is a Resource.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26515 Tue Nov 22 13:55:10 MST 2011 deryk.sinotte ICE-7191: adjust build to reflect new name and location of showcase
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/build.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26587 Fri Nov 25 13:07:06 MST 2011 deryk.sinotte ICE-7191: modify non-portlet friendly usage of HttpSession
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/progressbar/ProgressBarPush.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ProxySession.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26588 Fri Nov 25 13:12:08 MST 2011 deryk.sinotte ICE-7191: changes to support running each example as a separate portlet
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/liferay-display.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/portlet.xml
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/java/org/icefaces/application/showcase/util/PortletUtil.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/content-template.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/liferay-portlet.xml
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/portlet-view.xhtml
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/java/org/icefaces/application/showcase
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/build.xml
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/java/org/icefaces/application
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/java/org/icefaces
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/showcase-portlet.xhtml
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/java/org/icefaces/application/showcase/util
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/web.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/main-template.xhtml
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/java/org
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26595 Fri Nov 25 14:19:53 MST 2011 deryk.sinotte ICE-7191: remove unnecessary markup
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/main-template.xhtml
          Hide
          Deryk Sinotte added a comment -

          Checked in some changes to that each example is now configured to run as a separate portlet. We'll be going with this strategy until we can get the navigation issues fully resolved.

          Did some testing and it looks like most stuff appears to be relatively functional but there are some issues. Since there are over 80 individual portlet examples, I obviously haven't run them all nor have they been tested in many combinations.

          • Styling is better but still too wide.
          • Some examples refer to the "menus on the left" which are not there when running in portlets.
          • Interactions with some (non-navigation) examples are causing full page refreshes for some reason. ACE Context Menu with Table Integration and ACE Context Menu Effect are examples that do this.
          • I can get the following under certain conditions when more than one portlet is on the page. Perhaps if examples are sharing the same Window bean (ACE Context Menu with Table and ACE Context Menu with Effect)?

          Caused by: java.lang.IllegalStateException: Component ID A2232:j_idt85:j_idt85_windowviewid has already been found in the view.
          at com.sun.faces.util.Util.checkIdUniqueness(Util.java:833)
          at com.sun.faces.util.Util.checkIdUniqueness(Util.java:817)
          at com.sun.faces.util.Util.checkIdUniqueness(Util.java:817)
          at com.sun.faces.util.Util.checkIdUniqueness(Util.java:817)
          at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(StateManagementStrategyImpl.java:144)
          at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:133)
          at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:418)
          at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          ... 194 more

          • ACE File Entry blew chunks. Maybe be a difference in how the PortletFaces Bridge passes in certain parameters:

          java.lang.NullPointerException
          at org.icefaces.impl.context.DOMPartialViewContext.applyBrowserChanges(DOMPartialViewContext.java:351)
          at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:133)
          at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:390)
          at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
          at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:535)
          at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:131)
          at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:119)
          at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
          at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

          • Menus are getting "clipped" within the container in some way so that you can't see all the choices.
          • Tabset Proxy doesn't appear to work as content is not loaded into the tabs.
          • ProgressBarPush bean has a non-portlet friendly API usage that I have fixed. I did a quick scan and there are a couple of other problematic calls in FacesUtils but I don't think they are actually being used anywhere.
          Show
          Deryk Sinotte added a comment - Checked in some changes to that each example is now configured to run as a separate portlet. We'll be going with this strategy until we can get the navigation issues fully resolved. Did some testing and it looks like most stuff appears to be relatively functional but there are some issues. Since there are over 80 individual portlet examples, I obviously haven't run them all nor have they been tested in many combinations. Styling is better but still too wide. Some examples refer to the "menus on the left" which are not there when running in portlets. Interactions with some (non-navigation) examples are causing full page refreshes for some reason. ACE Context Menu with Table Integration and ACE Context Menu Effect are examples that do this. I can get the following under certain conditions when more than one portlet is on the page. Perhaps if examples are sharing the same Window bean (ACE Context Menu with Table and ACE Context Menu with Effect)? Caused by: java.lang.IllegalStateException: Component ID A2232:j_idt85:j_idt85_windowviewid has already been found in the view. at com.sun.faces.util.Util.checkIdUniqueness(Util.java:833) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:817) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:817) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:817) at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(StateManagementStrategyImpl.java:144) at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:133) at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:418) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) ... 194 more ACE File Entry blew chunks. Maybe be a difference in how the PortletFaces Bridge passes in certain parameters: java.lang.NullPointerException at org.icefaces.impl.context.DOMPartialViewContext.applyBrowserChanges(DOMPartialViewContext.java:351) at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:133) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:390) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:535) at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:131) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:119) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Menus are getting "clipped" within the container in some way so that you can't see all the choices. Tabset Proxy doesn't appear to work as content is not loaded into the tabs. ProgressBarPush bean has a non-portlet friendly API usage that I have fixed. I did a quick scan and there are a couple of other problematic calls in FacesUtils but I don't think they are actually being used anywhere.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26597 Fri Nov 25 15:36:25 MST 2011 deryk.sinotte ICE-7191: add guard for null parameter values when using File Download with PortletFaces Bridge
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
          Hide
          Deryk Sinotte added a comment -

          The ProgressBar now works as well as File Entry (after adding a check/fix for potential null parameters).

          Tried upgrading to MyFaces 2.1.4 but it caused a problem immediately with portlets so I will review updating the libs for after RC1.

          There's a very strange CSS resource processing bug when running the portlet examples with MyFaces. Haven't seen the same thing with Mojarra yet. The various 'resource' EL expressions that we use in our themes.css file look like this (and they are all basically the same):

          background:url("#

          {resource['icefaces.ace:themes/sam/images/ui-default.png']}

          ")

          However, after being processed in what only can be described as an incomplete way, they don't all come out the same. Here are a few examples of what the resource URLs get turned into when they arrive at the client. Notice the wide array of different beginnings to each URL string where all or part of the host, port, and path are missing:

          url("est/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-bg_flat_75_ffffff_40x100.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")

          url("lhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-default.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")

          url("localhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fsprite.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")

          url("b/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-icons_222222_256x240.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")

          Show
          Deryk Sinotte added a comment - The ProgressBar now works as well as File Entry (after adding a check/fix for potential null parameters). Tried upgrading to MyFaces 2.1.4 but it caused a problem immediately with portlets so I will review updating the libs for after RC1. There's a very strange CSS resource processing bug when running the portlet examples with MyFaces. Haven't seen the same thing with Mojarra yet. The various 'resource' EL expressions that we use in our themes.css file look like this (and they are all basically the same): background:url("# {resource['icefaces.ace:themes/sam/images/ui-default.png']} ") However, after being processed in what only can be described as an incomplete way, they don't all come out the same. Here are a few examples of what the resource URLs get turned into when they arrive at the client. Notice the wide array of different beginnings to each URL string where all or part of the host, port, and path are missing: url("est/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-bg_flat_75_ffffff_40x100.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2") url("lhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-default.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2") url("localhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fsprite.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2") url("b/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-icons_222222_256x240.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
          Ken Fyten made changes -
          Fix Version/s 3.1 [ 10312 ]
          Fix Version/s 3.0 [ 10241 ]
          Hide
          Deryk Sinotte added a comment -

          Running the ACE Showcase with MyFaces in a non-portlet environment and examining the theme.css file for the resolved resources, they all seem to follow a consistent pattern. So perhaps is an interaction between MyFaces and the PortletFaces Bridge that is causing the problem:

          url("/my/javax.faces.resource/themes/sam/images/ui-bg_flat_75_ffffff_40x100.png.jsf?ln=icefaces.ace")
          url("/my/javax.faces.resource/themes/sam/images/ui-default.png.jsf?ln=icefaces.ace")
          url("/my/javax.faces.resource/themes/sam/images/sprite.png.jsf?ln=icefaces.ace")

          Show
          Deryk Sinotte added a comment - Running the ACE Showcase with MyFaces in a non-portlet environment and examining the theme.css file for the resolved resources, they all seem to follow a consistent pattern. So perhaps is an interaction between MyFaces and the PortletFaces Bridge that is causing the problem: url("/my/javax.faces.resource/themes/sam/images/ui-bg_flat_75_ffffff_40x100.png.jsf?ln=icefaces.ace") url("/my/javax.faces.resource/themes/sam/images/ui-default.png.jsf?ln=icefaces.ace") url("/my/javax.faces.resource/themes/sam/images/sprite.png.jsf?ln=icefaces.ace")
          Hide
          Deryk Sinotte added a comment -

          This is looking pretty complicated. I think what's happening is that there is an interaction between the PortletFaces Bridge and MyFaces when doing stream reading/writing of the CSS files that have EL tidbits in them.

          In MyFaces, the work to read/indentify/replace the EL tags with the appropriate value is done in ResourceImpl by a special private class:

          private class ValueExpressionFilterInputStream extends InputStream
          {
          private PushbackInputStream delegate;

          public ValueExpressionFilterInputStream(InputStream in)

          { super(); delegate = new PushbackInputStream(in,255); }

          ...

          In the PortletFaces Bridge ResourceHandlerImpl, the resource reading and writing is relying on a couple of Channels:

          // Copy the bytes in the resource's input stream to the response's output stream.
          int responseContentLength = 0;
          readableByteChannel = Channels.newChannel(inputStream);
          writableByteChannel = Channels.newChannel(externalContext.getResponseOutputStream());

          I don't have details yet but my theory is that the Channels are interacting with the underlying MyFaces pushback streams while they are in the process of evaluating and writing the EL expressions which leads to the very non-deterministic results we are seeing.

          Show
          Deryk Sinotte added a comment - This is looking pretty complicated. I think what's happening is that there is an interaction between the PortletFaces Bridge and MyFaces when doing stream reading/writing of the CSS files that have EL tidbits in them. In MyFaces, the work to read/indentify/replace the EL tags with the appropriate value is done in ResourceImpl by a special private class: private class ValueExpressionFilterInputStream extends InputStream { private PushbackInputStream delegate; public ValueExpressionFilterInputStream(InputStream in) { super(); delegate = new PushbackInputStream(in,255); } ... In the PortletFaces Bridge ResourceHandlerImpl, the resource reading and writing is relying on a couple of Channels: // Copy the bytes in the resource's input stream to the response's output stream. int responseContentLength = 0; readableByteChannel = Channels.newChannel(inputStream); writableByteChannel = Channels.newChannel(externalContext.getResponseOutputStream()); I don't have details yet but my theory is that the Channels are interacting with the underlying MyFaces pushback streams while they are in the process of evaluating and writing the EL expressions which leads to the very non-deterministic results we are seeing.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26657 Wed Nov 30 16:00:37 MST 2011 deryk.sinotte ICE-7191: remove source code section from portlet version of template
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/SessionExpiredListener.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/WindowAndViewIDSetup.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/content-template.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/lib/portlets/portletfaces-bridge-2.0.2-SNAPSHOT.jar
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26659 Wed Nov 30 16:31:26 MST 2011 deryk.sinotte ICE-7191: revert inadvertent commits
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/SessionExpiredListener.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/WindowAndViewIDSetup.java
          Deryk Sinotte made changes -
          Link This issue depends on ICE-7518 [ ICE-7518 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 3.0 [ 10241 ]
          Fix Version/s 3.1 [ 10312 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26777 Thu Dec 08 09:36:48 MST 2011 deryk.sinotte ICE-7191: make the Cities list load in a lazier fashion to ensure a FacesContext is available
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/compat/autocomplete/AutocompleteData.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26778 Thu Dec 08 10:30:03 MST 2011 deryk.sinotte ICE-7191: add additional null and stale context checks for handling session invalidation via timeout - particularly in portals
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/SessionExpiredListener.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26788 Thu Dec 08 11:51:49 MST 2011 deryk.sinotte ICE-7191: catch Exceptions and log warning when session expires due to timeout in portals as the FacesContext may not be null but will be unusable at that point
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/SessionExpiredListener.java
          Hide
          Deryk Sinotte added a comment -

          Couple of comments about how to make the current showcase more portlet friendly:

          1) Adjust fixed width container

          The main-template.xhtml has a div with an id called container. The style for this is specified in the demo_tempate.css file as:

          #container

          { width: 1020px; margin: 0 auto; }

          That wide of a container makes it inconvenient to drop multiple portlets into a page. Perhaps a percentage would be more appropriate.

          2) CSS URL resources

          Portlets rely on different URL semantics than normal web applications. The way we do it our theme.css file, where we use the 'resource' expression language tactic allows for the portlet bridge to make the appropriate adjustments to the resource URL:

          url("#

          {resource['icefaces.ace:themes/rime/images/ui-bg_inset-hard_100_eeeeee_1x100.png']}

          "

          The themes that we include with the showcase example use "raw" URLs. For example, in showcase_styles.css we have:

          .ice-checkboxbutton .ui-state-active

          { background: url("/resources/css/images/success24.png") no-repeat; border: 1px; border-style: solid; }

          where it would be better to do:

          .ice-checkboxbutton .ui-state-active {
          background: url("#

          {resource['css/images/success24.png']}

          ") no-repeat;
          border: 1px;
          border-style: solid;
          }

          Show
          Deryk Sinotte added a comment - Couple of comments about how to make the current showcase more portlet friendly: 1) Adjust fixed width container The main-template.xhtml has a div with an id called container. The style for this is specified in the demo_tempate.css file as: #container { width: 1020px; margin: 0 auto; } That wide of a container makes it inconvenient to drop multiple portlets into a page. Perhaps a percentage would be more appropriate. 2) CSS URL resources Portlets rely on different URL semantics than normal web applications. The way we do it our theme.css file, where we use the 'resource' expression language tactic allows for the portlet bridge to make the appropriate adjustments to the resource URL: url("# {resource['icefaces.ace:themes/rime/images/ui-bg_inset-hard_100_eeeeee_1x100.png']} " The themes that we include with the showcase example use "raw" URLs. For example, in showcase_styles.css we have: .ice-checkboxbutton .ui-state-active { background: url("/resources/css/images/success24.png") no-repeat; border: 1px; border-style: solid; } where it would be better to do: .ice-checkboxbutton .ui-state-active { background: url("# {resource['css/images/success24.png']} ") no-repeat; border: 1px; border-style: solid; }
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27021 Wed Dec 21 13:28:22 MST 2011 deryk.sinotte ICE-7191: update templates to match changes in parent project, tweak the portlet build, and adjust portlet artifacts to match changes to the demos
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/liferay-display.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/portlet.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common-portlet.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/build.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/content-template.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/liferay-portlet.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/main-template.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27080 Tue Jan 03 14:21:49 MST 2012 deryk.sinotte ICE-7191: update templates to remove some unnecessary code and allow more flexible container widths
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/content-template.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/main-template.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27330 Mon Jan 23 16:58:32 MST 2012 deryk.sinotte ICE-7191: keep portal version of this css file to manage the width
          Files Changed
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/css/demo_template.css
          Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/css
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27332 Mon Jan 23 18:54:28 MST 2012 ken.fyten ICE-7191: keep portal version of this css file to manage the width
          Files Changed
          Commit graph ADD /icefaces3/tags/icefaces-3.0.0/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/css/demo_template.css
          Commit graph ADD /icefaces3/tags/icefaces-3.0.0/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/css
          Hide
          Deryk Sinotte added a comment -

          A working version of the ACE showcase that runs in a portal container has been developed and made available. Any ACE issues specific to portlets can be captured in separate JIRAs moving forward.

          Show
          Deryk Sinotte added a comment - A working version of the ACE showcase that runs in a portal container has been developed and made available. Any ACE issues specific to portlets can be captured in separate JIRAs moving forward.
          Deryk Sinotte made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial] [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27358 Wed Jan 25 13:51:58 MST 2012 deryk.sinotte ICE-7191: remove rime.css reference
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/main-template.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27396 Wed Jan 25 17:23:37 MST 2012 ken.fyten ICE-7191: remove rime.css reference
          Files Changed
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/main-template.xhtml
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: