0

how to invoke class constructor in binding?

asked 2015-06-30 01:42:06 +0800

trongdd gravatar image trongdd
1

with ZK8RC,

I can call class constructor in ${} expressions like

<label value="${Boolean(true)}"/>

but can not in binding expressions like

<label value="@load((Boolean(true)))"/>

I tried various forms of constructor but all gave error or no effects.

Any suggestions ?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-06-30 07:21:03 +0800

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

You have to use the core methods.

First of all declare your core taglib by :

<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>

Then you can use the following :

@load(c:new1('java.lang.Boolean', 'true'))

Now ZK does autocasting of the Boolean so you can do just like this(without the whole core method's) :

@load(true)

Greetz chill.

link publish delete flag offensive edit

Comments

thanks for posting a work around

cor3000 ( 2015-07-01 05:39:11 +0800 )edit
0

answered 2015-07-01 05:37:35 +0800

cor3000 gravatar image cor3000
6280 2 7

Thanks for testing ZK 8. In general this should work when EL 3.0 support is enabled:

this issue is currently under investigation http://tracker.zkoss.org/browse/ZK-2808 please follow the status there.

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
1 follower

RSS

Stats

Asked: 2015-06-30 01:42:06 +0800

Seen: 24 times

Last updated: Jul 01 '15

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