ICEmobile
  1. ICEmobile
  2. MOBI-836

server side switch in selected contentPane not updated view when all panes in contentStack are client true

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3 Final
    • Fix Version/s: 1.3.1
    • Component/s: Faces
    • Labels:
      None
    • Environment:
      JSF

      Description

      After selecting a menu item in a contentStackMenu you cannot programmatically select a contentPane from the server side.

      test case: mobitest/layout/contentStackMenu/contentStackMenuWithProgrammaticSelection.jsf

      steps to reproduce:
      1. select page 1
      2. click the 'menu' button in the header

      expected behaviour:
      The commandButton actionListener sets the currentPane and the UI will update to that pane.

      actual behaviour:
      The commandButton actionListener sets the currentPane but the UI does not update to that pane

        Issue Links

          Activity

          Philip Breau created issue -
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36665 Fri Jul 12 09:51:38 MDT 2013 philip.breau MOBI-836 Programmatic Selection of ContentPane with ContentStackMenu not working
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuWithCommandButton.xhtml
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/java/org/icefaces/mobile/layout/ContentStackMenu2.java
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuWithProgrammaticSelection.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36670 Fri Jul 12 13:11:48 MDT 2013 philip.breau MOBI-836 Programmatic Selection of ContentPane with ContentStackMenu not working
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuWithCommandButton.xhtml
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuOnLeftSideMultipleForms.xhtml
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuOnLeftSide.xhtml
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/java/org/icefaces/mobile/layout/ContentStackMenu3.java
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuSmallAndLargeViews.xhtml
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuWithProgrammaticSelection.xhtml
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/pages.xhtml
          Hide
          Judy Guglielmin added a comment -

          see ...mobitest/pagePanel/pagePanelWithContentNavBar.jsf or ....mobitest/pagePanel/pagePanel2WithContentNavBar.jsf
          currently they are not getting the correct class for transitions applied, so will fix that and if this markup can be used, should be good enough .

          Show
          Judy Guglielmin added a comment - see ...mobitest/pagePanel/pagePanelWithContentNavBar.jsf or ....mobitest/pagePanel/pagePanel2WithContentNavBar.jsf currently they are not getting the correct class for transitions applied, so will fix that and if this markup can be used, should be good enough .
          Hide
          Judy Guglielmin added a comment -

          should have explained that the reason that this was not updated was because all the contentPane's are "client", so the state on the client side is not getting updated by the server (all client). This could be what the issue is and I may have misunderstood, so will also look at this to ensure that even if they are all client side panes, any server update should switch panes (but you still won't see transitions as a result as commandButton and server side switch will not necessarily trigger transitions --no guarantee).

          Show
          Judy Guglielmin added a comment - should have explained that the reason that this was not updated was because all the contentPane's are "client", so the state on the client side is not getting updated by the server (all client). This could be what the issue is and I may have misunderstood, so will also look at this to ensure that even if they are all client side panes, any server update should switch panes (but you still won't see transitions as a result as commandButton and server side switch will not necessarily trigger transitions --no guarantee).
          Judy Guglielmin made changes -
          Field Original Value New Value
          Summary Programmatic Selection of ContentPane with ContentStackMenu not working server side push of switch in selected contentPane not updated view when all panes in contentStack are client true
          Philip Breau made changes -
          Summary server side push of switch in selected contentPane not updated view when all panes in contentStack are client true server side switch in selected contentPane not updated view when all panes in contentStack are client true
          Hide
          Philip Breau added a comment -

          We also have to ensure that a client side selection of a pane should not be reverted by a subsequent form submission. eg:

          1. user clicks commandButton that sets the content pane to pane1.
          2. user clicks pane2 in the contentStackMenu and is taken to pane2 with a transition.
          3. user submits a form on pane2.

          After the step 3 the current pane should stay pane2 and the UI should not be reverted to pane1, eventhough the server side binding at that point might still be pane1. In order to make this work sensibly we may need to take the timestamp of client and server side pane changes into account. eg. if the server side binding says pane1, but the timestamp is earlier than the last client side selection, the contentStack should not be updated to pane1. Later client side pane selections should always override the server side binding.

          Show
          Philip Breau added a comment - We also have to ensure that a client side selection of a pane should not be reverted by a subsequent form submission. eg: 1. user clicks commandButton that sets the content pane to pane1. 2. user clicks pane2 in the contentStackMenu and is taken to pane2 with a transition. 3. user submits a form on pane2. After the step 3 the current pane should stay pane2 and the UI should not be reverted to pane1, eventhough the server side binding at that point might still be pane1. In order to make this work sensibly we may need to take the timestamp of client and server side pane changes into account. eg. if the server side binding says pane1, but the timestamp is earlier than the last client side selection, the contentStack should not be updated to pane1. Later client side pane selections should always override the server side binding.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36974 Tue Jul 16 12:56:01 MDT 2013 judy.guglielmin MOBI-836 new test page which will work without modifying code for 1.3
          Files Changed
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/mobi836WithContentNavBar.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36992 Wed Jul 17 10:15:06 MDT 2013 philip.breau MOBI-836 Programmatic Selection of ContentPane with ContentStackMenu not working
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/java/org/icefaces/mobile/layout/ContentStackMenu2.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuWithProgrammaticSelection.xhtml
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/java/org/icefaces/mobile/layout/ContentStackMenu4.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36993 Wed Jul 17 11:20:29 MDT 2013 judy.guglielmin MOBI-836 updated sample tests for testing with clean checkout
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuSingle.xhtml
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/mobi836WithContentNavBar.xhtml
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/java/org/icefaces/mobile/layout/ContentStackMenu2.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layoutComponents.html
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/layout/contentStackMenu/contentStackMenuWithProgrammaticSelection.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #36996 Wed Jul 17 11:45:46 MDT 2013 judy.guglielmin MOBI-836 ensure that update script is not wiped out by domdiff.
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/contentstack/ContentStackRenderer.java
          Judy Guglielmin made changes -
          Fix Version/s 1.4 Beta [ 10874 ]
          Judy Guglielmin made changes -
          Assignee Steve Maryka [ steve.maryka ] Judy Guglielmin [ judy.guglielmin ]
          Hide
          Judy Guglielmin added a comment -

          rev. 36996

          Show
          Judy Guglielmin added a comment - rev. 36996
          Judy Guglielmin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Philip Breau added a comment -

          If you include only one form in the root of the page the following stack trace occurs after causing a form submit after a pane change:

          java.lang.IllegalArgumentException: ""
          at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:576)
          at org.icefaces.mobi.component.contentstack.ContentStackRenderer.encodeScript(ContentStackRenderer.java:152)
          at org.icefaces.mobi.component.contentstack.ContentStackRenderer.encodeEnd(ContentStackRenderer.java:132)
          at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
          at org.icefaces.mobi.utils.JSFUtils.renderLayoutChild(JSFUtils.java:241)
          at org.icefaces.mobi.component.pagepanel.PagePanelRenderer.encodeEnd(PagePanelRenderer.java:100)
          at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
          at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
          at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
          at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
          at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)

          Show
          Philip Breau added a comment - If you include only one form in the root of the page the following stack trace occurs after causing a form submit after a pane change: java.lang.IllegalArgumentException: "" at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:576) at org.icefaces.mobi.component.contentstack.ContentStackRenderer.encodeScript(ContentStackRenderer.java:152) at org.icefaces.mobi.component.contentstack.ContentStackRenderer.encodeEnd(ContentStackRenderer.java:132) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) at org.icefaces.mobi.utils.JSFUtils.renderLayoutChild(JSFUtils.java:241) at org.icefaces.mobi.component.pagepanel.PagePanelRenderer.encodeEnd(PagePanelRenderer.java:100) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
          Philip Breau made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Judy Guglielmin made changes -
          Link This issue depends on MOBI-672 [ MOBI-672 ]
          Philip Breau made changes -
          Assignee Judy Guglielmin [ judy.guglielmin ] Philip Breau [ philip.breau ]
          Hide
          Philip Breau added a comment -

          last issue fixed in rev 38315 (MOBI-320)

          Show
          Philip Breau added a comment - last issue fixed in rev 38315 ( MOBI-320 )
          Philip Breau made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #38315 Mon Sep 30 11:16:07 MDT 2013 philip.breau MOBI-836 NPE thrown when calling UIComponent.findComponent() with empty string id
          - guard against all calls to UIComponent.findComponent() with a check for a null or empty string
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/submitnotification/SubmitNotificationRenderer.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/contentstack/ContentStackRenderer.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/contentmenuitem/ContentMenuItemRenderer.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/button/CommandButtonRenderer.java
          Philip Breau made changes -
          Fix Version/s 1.3.1 [ 11376 ]
          Fix Version/s 1.4 Beta [ 10874 ]

            People

            • Assignee:
              Philip Breau
              Reporter:
              Philip Breau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: