0

Use of Enum in zul and static import with ZK 8

asked 2016-06-14 10:07:10 +0800

WilliamB gravatar image WilliamB
1609 1 6

updated 2016-06-14 10:13:07 +0800

I thought I read that ZK8 would handle enum usage in zul file ? Either through static import or something.

Can anyone enlight me ?

If i wanted to do something like

${vm.myValue eq MyEnum.VALUE1}

Also I'm curious which version of EL does ZK8 uses ?

delete flag offensive retag edit

Comments

William, it's EL3. I'll test enum tomorrow, onstants have to be in a class, not interface.

chillworld ( 2016-06-15 16:37:21 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-16 11:22:32 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

hey William,

I have tested it in a fiddle
The fault we get is pretty strange, looks like Fiddle created 2 different classes while an enum should be the best singleton what there is.

So next, I wanted to use the normal equal and came to this fiddle.

Witch also don't work.

So the only thing what works, are constants in a normal java class, not an interface. Maybe you could test the first method in a real IDE, but ....

Greetz chill.

link publish delete flag offensive edit

Comments

Hey Chill, this page referes how to import and use static method / attribut : https://www.zkoss.org/wiki/ZUMLReference/ZUML/ProcessingInstructions/import#Import_Classes

WilliamB ( 2016-06-20 07:36:29 +0800 )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
1 follower

RSS

Stats

Asked: 2016-06-14 10:07:10 +0800

Seen: 21 times

Last updated: Jun 16 '16

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