0

problem of version 3.6.1 with parameter 'arg' in GenericForwardComposer

asked 2009-05-04 08:26:16 +0800

e gravatar image e
21

I put an Object into a new zul page as a parameter like this:

Map<String, Object> paramMap = new LinkedHashMap<String, Object>();
User p = (User) listitem.getValue();
paramMap.put("u", p);
Window win = (Window) Executions.createComponents("/WEB-INF/panels/user_modify.zul", wd, paramMap);
win.doHighlighted();

...

in the target composer,like this: User a= (User) arg.get("u");
but then in runtime, a is null, why?

when i replace with old version jars into WEB-INF/lib,the code is right again.

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-05-04 11:09:35 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

arg variable is not wired by ZK yet. Please use Java API to get the param.
ex.

Executions.getCurrent().getArg().get("u")

/robbie

link publish delete flag offensive edit

answered 2009-05-05 01:10:34 +0800

e gravatar image e
21

ok,thanks!

but I think it should be marked like "@Deprecated"...

link publish delete flag offensive edit

answered 2009-05-05 08:58:21 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi e,

have a look at this thread and study the code.
Look for BaseCtrl.java and BranchDialogCtrl.java. Search for args.
Runs in 3.5.2 up to 3.6.1.

this

regards
Stephan

PS: help to prevent the global warming by writing cool software

link publish delete flag offensive edit

answered 2009-05-05 19:02:20 +0800

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

Hi e,
I put that same kind of code into doAfterCompose(...) after my call to super.doAfterCompose(...). This wires the auto variables like arg. I don't know at what point you need that value, but I pass in the logged-in user, permissions, and other values this way and have an app I'm working on that depends on this scheme. I've upgraded to 3.6.1 and it still works.

Cary

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-05-04 08:26:16 +0800

Seen: 259 times

Last updated: May 05 '09

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