-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.4
-
None
Steps to recreate:
1. Go to the ZK Drag and Drop demo at http://www.zkoss.org/zkdemo/layout/portal_layout
2. Put all portal elements into first column (this step is not mandatory)
2. Make page refresh (f5) to see that the portal view is recreated properly through session
3. Drag first portal element and drop it to the location it was dragged from (first position)
4. The view is rendered properly (nothing changes) ,but in onPortalMove event that is handled in method
@Listen("onPortalMove = #portalLayout")
public void saveStatus() {
int i = 0;
for (Component portalChild : portalLayout.getChildren())
}
the portalLayoutChildren elements (portalLayout.getChildren()) are passed in wrong order -> the dragged element is on the second position in the list, like it was moved one position down.
This wrong state is saved in session
5. Now refresh the page (f5) and you will notice that the portallayout view recreated from the session state has changed (the first element is moved to the second position although it shouldn't)