thanks, I'll have a look at those references and give it a try
gsanmartin ( 2014-10-01 07:48:58 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a main controller that is assigned to a template zul, there I have a menu where I update certain parts of the website, like I keep the header and footer and the content area is updated via AJAX.
I followed this tutorial:
http://books.zkoss.org/wiki/ZK_Developer's_Reference/UI_Patterns/Browser_History_Management (http://books.zkoss.org/wiki/ZKDeveloper'sReference/UIPatterns/BrowserHistory_Management)
Now in my "main controller" (which I named TemplateController) I subscribe to bookmark changes like this:
private void addEventListenerBookmark(){
getCurrentPage().addEventListener("onBookmarkChange", new EventListener() {
public void onEvent(Event event) throws UiException {
String bookmark = ((BookmarkEvent) event).getBookmark();
procesaBookmark(bookmark);
}
});
}
which is called on my TemplateController constructor:
public TemplateController()
{
subscribeColaEventos();
}
This works fine, so if for instance from the index page I select menuoption1 I append #option1 to my url and then I can go back to the index page with the browser.
The problem is, if I directly load index.zul#option1, the rendering process first renders the index page, and when it's done it goes on rendering my option1 page; it seems the controller only gets subscribed to the bookmark event queue after page rendering.
Hello gsanmartin,
After searching some older posts there are two solutions for your issue:
For more information and examples please refer to the following url:
http://forum.zkoss.org/question/38049/onbookmarkchange-prevent-loading-the-first-page/
Best Regards,
Darksu
thanks, I'll have a look at those references and give it a try
gsanmartin ( 2014-10-01 07:48:58 +0800 )editAsked: 2014-09-11 16:24:33 +0800
Seen: 26 times
Last updated: Sep 28 '14
How to stop combining commands in an ajax call ?
zk developmet is esay [closed]
Need help with scrolling horizontal tabs in Right-to-Left (Arabic)
Create tab dynamically, multitab application
Radio button value change on database value
How to implement, each user has its own session timeout time