0

Moving to ZK8: Failed to parse the expression

asked 2015-12-02 13:23:04 +0800

KMaria gravatar image KMaria flag of Russian Federation
30 3

Hi All!

After moved my project form ZK7 to ZK8 I get this error every time the page is loaded:

Failed to parse the expression [${.evmailSubjectBeans}]

It's caused by expression in "visible" attribute:

<chosenbox id="esuChosenbox"
           model="@load(ivm.evmailsubjects)" 
           selectedObjects="@bind(ivm.inventory.evmailSubjectBeansEntries)" 
           visible="@bind(!ivm.inventory.evmailSubjectBeansEntries.isEmpty())"/>

I found that problem in @DependsOn annotation on getter:

 @DependsOn("evmailSubjectBeans")
 public Collection getEvmailSubjectBeansEntries()
 ...

How can I fix this? It was working while the project used ZK7 and it's working without @DependsOn, but the annotation is needed for other functionality.

Thanks in advance!

delete flag offensive retag edit

Comments

I think you need to use not instead of !

chillworld ( 2015-12-02 14:23:23 +0800 )edit

Nope, the same error. It's not connected with expression syntax, other "visible" attributes with similar logic and syntax works fine. The problem in @DependsOn annotation and apparently how it's translated on page in new ZK8

KMaria ( 2015-12-02 14:47:02 +0800 )edit

is there a setter setEvmailSubjectBeans in the same class as whete the DependsOn is?

chillworld ( 2015-12-02 15:14:49 +0800 )edit

Sure, getEvmailSubjectBeans and setEvmailSubjectBeans both are in place

KMaria ( 2015-12-02 15:33:42 +0800 )edit

maybe bug, if you could create a sample in fiddle where you have same behavior, you could post it on bugtraker

chillworld ( 2015-12-02 15:48:42 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-04-07 06:30:27 +0800

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

http://tracker.zkoss.org/browse/ZK-3107 fixed in 8.0.2

link publish delete flag offensive edit
0

answered 2016-01-06 12:43:02 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Try:

visible="@bind(!ivm.inventory.getEvmailSubjectBeansEntries().isEmpty())"/>

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-12-02 13:23:04 +0800

Seen: 62 times

Last updated: Apr 07 '16

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