0

annotation in zscript

asked 2023-03-01 20:13:46 +0800

AlfredoGuiral gravatar image AlfredoGuiral
1

Hello,

how can I make use of annotation in zscript (inside a .zul file).

For example, in test.zul:

<zk:zscript language="Java">

    public class Myclass 
{

       public Myclass() 
       {
    super();
    }

    @Init
    public void init(@BindingParam("param") String param)
        { . .. }

]]></zk:zscript>

since running the zul file I get this error

'' Token Parsing Error: Lexical error at line 21, column 26. Encountered: "I" (73), after : "@": <at unknown="" location="">

Thanks

Alfredo

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-02 12:06:27 +0800

hawk gravatar image hawk
3135 1 5
http://hawkphoenix.blogsp... ZK Team

zscript relies on bean shell which doesn't support full java syntax like annotation, generic type. Please put those code in a composer/ViewModel.

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

RSS

Stats

Asked: 2023-03-01 20:13:46 +0800

Seen: 4 times

Last updated: Mar 02

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