Zul file cannot understand Java methods with variable parameters and also anonymous inner classes

asked 2018-02-24 01:06:08 +0800

saffar4ever gravatar image saffar4ever

I noticed that I cannot do these two things in Zul file in zscript. For optional parameters, the code compiles but I get run time error. For the second, the code does not compile.

Can someome help me please on what's the right way to use these in Zul file? I currently call a static Java function and do them in that helper function. I want to include it in the Zul file.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-01 10:42:53 +0800

cor3000 gravatar image cor3000
4293 1 7
ZK Team

Since zscript is interpreted by beanshell (default) you mostly have to stick to Java 1.4 language features. (Other possible interpreters are JavaScript, Groovy, Ruby, Python)

Here an example showing how a variable arguments method (e.g. Arrays.asList(T...)) can be called and how to implement an anonymous inner class (e.g. EventListener).


link publish delete flag offensive edit
Your answer
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




Asked: 2018-02-24 01:06:08 +0800

Seen: 16 times

Last updated: Mar 01

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