0

is it possible to have default variable resolver and listener for a jar base?

asked 2009-10-31 12:45:41 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

As so far as I know(or, maybe I just forgot)..variable resolver must be declared in zul's directive,
and listener is defined in zk.xml.

Is is possible to have some resolvers and listeners that defined in a jar file's metainfo,
then I only need to do is putting this jar into /lib, and zk will load it automatically (no need to write resolver on each page and zk.xml).

thanks~~cute guys.

/Dennis

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-11-04 04:40:56 +0800

iantsai gravatar image iantsai
2755 1

I can't find any layer to let you do this in Jar loading, you can post a Feature Request.(Tom said it would be easy~)

Maybe the simplest way is to extends UiFactory, override getPage() and insert your variable-resolver into new page.

But you still need to declare your new UiFactory in zk.xml.

link publish delete flag offensive edit

answered 2009-11-04 19:06:34 +0800

iantsai gravatar image iantsai
2755 1

metainfo/zk/config.xml doesn't accept ui-factory-class and many other setting. However, it accepts listener, thus you can specify

       <listener>
               <listener-class>org.zkoss.zkmax.init.WebAppInit</listener-class>
       </listener>

Then, in the WebAppInit implementation:

       public void init(WebApp wapp) throws Exception {
               wapp.getConfiguration().setUiFactoryClass(FooUiFactory.class);
       }

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-10-31 12:45:41 +0800

Seen: 388 times

Last updated: Nov 04 '09

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