ICEmobile
  1. ICEmobile
  2. MOBI-1025

Client Side PanelPopup open/closed state is conflicting with server-side state

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE 1.3.0.GA_P01
    • Fix Version/s: 1.3.1
    • Component/s: Faces
    • Labels:
      None
    • Environment:
      n/a

      Description

      1) Navigate to mobileshowcase/showcase.jsf or mobileshowcase/simulator
      2) Navigate to the Panel Popup demo
      3) Turn clientSide ON
      4) Click 'Show Client-side Popup' button
      5) Select an item from the list (eg. Battery use)
      6) Click 'Close Popup'
      7) Navigate to another demo
      8) Navigate back to the Panel Popup demo (popup is displayed)

        Activity

        Philip Breau created issue -
        Philip Breau made changes -
        Field Original Value New Value
        Summary Closed client side popup is reopened after a form post PanelPopup is not serializing open/closed state in hidden input
        Philip Breau made changes -
        Summary PanelPopup is not serializing open/closed state in hidden input Client Side PanelPopup open/closed state is conflicting with server-side state
        Hide
        Philip Breau added a comment -

        This issue seems to be inherent in the way panelPopup was designed. Both the client side and server side versions serialize the open/closed state in a hidden input which can be posted to the server, and the server renders the open/closed state for both client side and server side versions.

        In the client-side demo, when the user selects an item, a form post is sent to the server, and the server updates the popup state to 'open'. Then user then closes the popup, but the server is not updated as it's just a client side event. The 'closed' state is serialized to the hidden input. But when the user navigates to another demo, the hidden input is not sent in the form post as it's in a different form. Thus, the server and client states become unsynchronized. There's really no way to keep them synchronized if using different forms.

        This issue wasn't seen in the 1.3 version because the demo at that time because the demo had been using a 'button' element, rather than a 'a' element, as it is now. The button element causes a form post, so the demo in 1.3 wasn't really client side, as the server was being updated with the client-side state.

        We should make the client side popup completely client side. The server should always render the client side popup in a closed state, and it should be up to the developer to make sure that server side interactions don't interfere with the open/closed state of the popup.

        Show
        Philip Breau added a comment - This issue seems to be inherent in the way panelPopup was designed. Both the client side and server side versions serialize the open/closed state in a hidden input which can be posted to the server, and the server renders the open/closed state for both client side and server side versions. In the client-side demo, when the user selects an item, a form post is sent to the server, and the server updates the popup state to 'open'. Then user then closes the popup, but the server is not updated as it's just a client side event. The 'closed' state is serialized to the hidden input. But when the user navigates to another demo, the hidden input is not sent in the form post as it's in a different form. Thus, the server and client states become unsynchronized. There's really no way to keep them synchronized if using different forms. This issue wasn't seen in the 1.3 version because the demo at that time because the demo had been using a 'button' element, rather than a 'a' element, as it is now. The button element causes a form post, so the demo in 1.3 wasn't really client side, as the server was being updated with the client-side state. We should make the client side popup completely client side. The server should always render the client side popup in a closed state, and it should be up to the developer to make sure that server side interactions don't interfere with the open/closed state of the popup.
        Philip Breau made changes -
        Assignee Steve Maryka [ steve.maryka ] Philip Breau [ philip.breau ]
        Hide
        Philip Breau added a comment -

        Revision: 40029
        Author: philip.breau
        Date: February-14-14 1:30:20 PM
        Message:
        MOBI-1025
        Client Side PanelPopup open/closed state is conflicting with server-side state

        • do not set hidden input for client side popup

          Modified : /icemobile/trunk/icemobile/core/src/main/java/org/icemobile/renderkit/PanelPopupCoreRenderer.java
          Modified : /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
          Modified : /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/panelpopup/PanelPopupRenderer.java
          Modified : /icemobile/trunk/icemobile/samples/jsf/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/layout/panelpopup-example.xhtml

        Show
        Philip Breau added a comment - Revision: 40029 Author: philip.breau Date: February-14-14 1:30:20 PM Message: MOBI-1025 Client Side PanelPopup open/closed state is conflicting with server-side state do not set hidden input for client side popup Modified : /icemobile/trunk/icemobile/core/src/main/java/org/icemobile/renderkit/PanelPopupCoreRenderer.java Modified : /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js Modified : /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/panelpopup/PanelPopupRenderer.java Modified : /icemobile/trunk/icemobile/samples/jsf/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/layout/panelpopup-example.xhtml
        Philip Breau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #40029 Fri Feb 14 10:30:20 MST 2014 philip.breau MOBI-1025
        Client Side PanelPopup open/closed state is conflicting with server-side state
        - do not set hidden input for client side popup
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/panelpopup/PanelPopupRenderer.java
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsf/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/layout/panelpopup-example.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
        Commit graph MODIFY /icemobile/trunk/icemobile/core/src/main/java/org/icemobile/renderkit/PanelPopupCoreRenderer.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: