Details
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)
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 |
Philip Breau
made changes -
Assignee | Steve Maryka [ steve.maryka ] | Philip Breau [ philip.breau ] |
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 | Client Side PanelPopup open/closed state is conflicting with server-side state - do not set hidden input for client side popup |
Files Changed | ||||
MODIFY
/icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/panelpopup/PanelPopupRenderer.java
MODIFY /icemobile/trunk/icemobile/samples/jsf/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/layout/panelpopup-example.xhtml MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js MODIFY /icemobile/trunk/icemobile/core/src/main/java/org/icemobile/renderkit/PanelPopupCoreRenderer.java |
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.