-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I'm experimenting with setting Desktop bookmarks on a page that has a number of different states. Everything is working fine with Firefox and Safari, and everything works fine in IE until I leave the page and try to come back. Consider this sequence, all URL changes via mouse clicks:
home.html
myzkpage.zul
myzkpage.zul#one
myzkpage.zul#two
myzkpage.zul#three
someother.html
someother.html is accessed via clicking a button on myzkpage.zul#three and sending a redirect. Hitting the back button at the last page brings me to myzkpage.zul#three but the next click on back brings me to home.html! Again, only with IE.
Anyone seen this sort of thing?
Thanks.
/Daryl
I was mistaken about the jump from myzkpage.zul#three to someother.html. I was using a Button but with href set. I changed it to Toolbatbutton with href for a more direct link but it still behaves the same way.
/Daryl
@dastultz,
Which ZK version are you using?
We do implement a workaround and have done since the first ZK version. Could you please try ZK demo with your browser to see if there is a similar issue?
In addition if you post your sample code I will take a look into what is happening.
I'm using 3.6.3. Here's how to reproduce. Create three files:
bookmark_start.zul:
<window> <toolbarbutton label="Start" href="bookmark.zul" /> </window>
bookmark.zul:
<window id="wnd" title="Bookmark Demo" width="400px" border="normal"> <zscript> page.addEventListener("onBookmarkChange", new EventListener() { public void onEvent(Event event) throws UiException { try { wnd.getFellow(wnd.desktop.bookmark).setSelected(true); } catch (ComponentNotFoundException ex) { tab1.setSelected(true); wnd.desktop.bookmark = ""; } } }); void setBookmark() { if (! tbox.selectedTab.id.equals("tab1")) desktop.bookmark = tbox.selectedTab.id; else desktop.bookmark = ""; } </zscript> <tabbox id="tbox" width="100%" onSelect="setBookmark()"> <tabs> <tab id="tab1" label="Tab 1"/> <tab id="tab2" label="Tab 2"/> <tab id="tab3" label="Tab 3"/> </tabs> <tabpanels> <tabpanel>This is panel 1</tabpanel> <tabpanel>This is panel 2</tabpanel> <tabpanel>This is panel 3</tabpanel> </tabpanels> </tabbox> After "start", click tab2, then tab 3, then click here: <toolbarbutton label="Leave page" href="bookmark_end.zul" /> </window>
bookmark_end.zul:
<window> Now click back button. </window>
Start with "bookmark_start.zul". Click start, then tab2, then tab 3, then "leave page". Then click back button several times. In Safari, the back button takes you to tab3, then 2, then 1, then to "start". In IE (7 and probably 8), the back button goes to tab3, then directly to "start".
/Daryl
Hey Daryl, thanks for the excellent instructions on reproducing the bug. I have confirmed bug and written it up for you here.
Asked: 2010-03-30 10:31:52 +0800
Seen: 315 times
Last updated: Apr 15 '10