0

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
1

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
0

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

cor3000 gravatar image cor3000
6280 2 7

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).

Robert

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

Follow
2 followers

RSS

Stats

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

Seen: 17 times

Last updated: Mar 01 '18

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