0

dynamically register Richlet without zk.xml file

asked 2009-04-25 15:38:49 +0800

naarani gravatar image naarani
33
www.blogstudiolegale.eu

this three commands seems to let add a richlet without an xml file to configure 'em:
1) Executions.getCurrent().getDesktop().getWebApp().getConfiguration().addRichlet(name, richletClass, params);
2) Executions.getCurrent().getDesktop().getWebApp().getConfiguration().addRichlet(name, richletClassName, params);
3) Executions.getCurrent().getDesktop().getWebApp().getConfiguration().addRichletMapping(name, PATH_LOGIN);

the first two create 'em (?) the last map it to a context(?)

However: how to use 'em without a DESKTOP(!) ?
Anyone know is this methods could be used inside a Servlet or a filter etc
(when the user is not in a desktop Executions.getCurrent() returns null)


cya, thanks

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-04-25 15:45:57 +0800

jtoupin gravatar image jtoupin
156

You can retrieve the WebApp from the ServletContext.

See: http://zkoss.org/javadoc/3.6.0/zk/org/zkoss/zk/ui/http/WebManager.html

Get the web manager for the context then get the WebApp from it. It should work.

link publish delete flag offensive edit

answered 2009-04-25 16:07:50 +0800

naarani gravatar image naarani
33
www.blogstudiolegale.eu

thank you,
I'll try to use it (it still needs a ServletContext I'm checking if it could be used by a Listener, if not I'll move it into a Filter)

link publish delete flag offensive edit

answered 2009-04-26 23:46:17 +0800

jtoupin gravatar image jtoupin
156

You are welcome. Let me know how it goes. I might need to so something similar in one of my projects.

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-04-25 15:38:49 +0800

Seen: 232 times

Last updated: Apr 26 '09

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