0

Session scope for Zk and application for Zk

asked 2009-08-22 04:33:55 +0800

best0032001 gravatar image best0032001
69 2

I am new user of Zk
I have more question for zk
Thank you for every answer for me

I want to see that example for use Session and application

In servlet I can use Session on request.getSession() and set attribute

Thank you for example Session

delete flag offensive retag edit

6 Replies

Sort by » oldest newest

answered 2009-08-22 12:30:02 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

take a look at the Executions class:

    String paramValue = Executions.getCurrent().getParameter( "paramName" ) ;

link publish delete flag offensive edit

answered 2009-08-24 04:33:11 +0800

woodyki gravatar image woodyki
168

Please read the documentation

http://docs.zkoss.org/wiki/Inter_page%2C_app_communication#Attributes

link publish delete flag offensive edit

answered 2009-08-26 05:43:08 +0800

best0032001 gravatar image best0032001
69 2

thank you woodyki and caclark

link publish delete flag offensive edit

answered 2009-08-28 17:27:06 +0800

best0032001 gravatar image best0032001
69 2

I user extends Window. it easy for me

I can use Session with this code "HttpSession s=((HttpServletRequest)Executions.getCurrent().getNativeRequest()).getSession();"
this is same use Session in servlet.

when I use servlet I can use applicationScope with code "ServletContext context = getServletContext();"
However I don't know how to get applicationScope in Window

link publish delete flag offensive edit

answered 2009-08-29 01:34:07 +0800

best0032001 gravatar image best0032001
69 2

to day I found How to use Session in Window is better than "HttpSession s=((HttpServletRequest)Executions.getCurrent().getNativeRequest()).getSession();"

I can use Session with import org.zkoss.zk.ui.Sessions and use Sessions.getCurrent() It work for me
However I don't know how to get applicationScope in Window ?

็ำhelp me

link publish delete flag offensive edit

answered 2009-08-29 02:14:59 +0800

best0032001 gravatar image best0032001
69 2

oh i found
getDesktop().getWebApp().getAttribute("app") ; this is use for applicationscope

I think that Zk doc is have some problem for beginer
I read http://docs.zkoss.org/wiki/ZUML_Implicit_Objects
and i know application org.zkoss.zk.ui.WebApp The Web application.
but I don't know How to use WebApp

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-08-22 04:33:55 +0800

Seen: 975 times

Last updated: Aug 29 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More