-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,I want to use zk in my portal environment to develop portlet,In the portal page,there maybe other portlet not develop using ajax technology,so operation in non-ajax-portlet may result in whole portal page refresh.so how can I keep the component state of the zk-portlet(if there are tree with two node expand in the zk-portlet,keep that after the page refresh..etc..)? because zk has the corresponding desktop ,page and component in the server side,so feel this issue can be resolve,but how?
thanks
best rgds
L.J.W
I think you should store the data that you want to keep between refresh in session scope and use data binding to populate it. Everytime a refresh happens the data binding will get the data from session into your portlet.
The components of a page in server side are all recreated if the user refresh the page.
Obs.: I never used portlet I'm assuming they behave like other pages/components.
any method not recreate the desktop,page and components when refresh browser,and only retrieve the existed Desktop and Page Object and redraw ?
I am confused about the concept:Desktop and Page,ZK document say Desktop may contain many pages,what 's meaning?any example about one desktop contain many pages?what's relationship about URL,Http Session,Desktop and Page?
When I refresh Browser,I find DHtmlLayoutServlet will create new Desktop and Page and Components each time,old Object seems be discard,I think this will result in many discard objects in the session scope,any issues?
I Don't understand the first question.
I never found it written but I believe that Desktop is very like as HTTP Session, it can store data and share with it's page, or a better view of the things is that de Desktop is in session scope.
When refresh the page the Desktop is not recreated but the page and it's components are. I don't think this a problem because the generational garbage collector handle very well young objects being discard.
thanks jumper,but my question is :
any method not recreate the desktop,page and components when refresh browser,and only retrieve the existed Desktop and Page Object and redraw ?
I am confused about the concept:Desktop and Page,ZK document say Desktop may contain many pages,what 's meaning?any example about one desktop contain many pages?what's relationship about URL,Http Session,Desktop and Page?
When I refresh Browser,I find DHtmlLayoutServlet will create new Desktop and Page and Components each time,old Object seems be discard,I think this will result in many discard objects in the session scope,any issues?
Hi,
There is a way to reuse the desktop, but it is not easy to do so.
Please check the org.zkoss.spring.security.config.ZkDesktopReuseFilter and ZkSpringUiFactory from the SVN repository.
Thanks jumper
Can this feature add in ZK 5.0?because I think serverside executing is the most different and advantage when compare ZK with other ajax-web framework like GWT.If not only using ajax style but also keeping components state when refreshing browser,It's cool,and will be great feature of ZK!
L.J.W
Hi,
You can post a feature request.
Thanks,
Asked: 2009-11-25 01:25:33 +0800
Seen: 1,101 times
Last updated: Nov 30 '09