-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
arg variable is not wired by ZK yet. Please use Java API to get the param.
ex.
Executions.getCurrent().getArg().get("u")
/robbie
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.
regards
Stephan
PS: help to prevent the global warming by writing cool software
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
Asked: 2009-05-04 08:26:16 +0800
Seen: 259 times
Last updated: May 05 '09