MVVM EL Condition Help Please

asked 2013-08-08 03:25:35 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
package com.product.webapp.enums;

public enum RecordMode { ADD, EDIT, READ; }

<button label="Reset Password"
                    visible="@load(vm.recordMode eq com.product.webapp.enums.RecordMode.EDIT)"

I am trying to visible on off based on the value. But it has no effect. Any help.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-08 07:17:22 +0800

khcyt gravatar image khcyt
216 1

Hello Sentil, apparently ZK bind does not work with enum.

Add this line in your zul file.

<zscript>String s_EDIT= com.product.webapp.enums.RecordMode.EDIT.toString();</zscript>

Change your statement as follows.

visible="@load(s_EDIT eq vm.recordMode.toString())"

This should work


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

1 follower



Asked: 2013-08-08 03:25:35 +0800

Seen: 27 times

Last updated: Aug 08 '13

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