0

MVVM EL Condition Help Please

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

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...
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)"
                    onClick="@command('onResetPassword')">
                </button>

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
0

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

Kai

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: 2013-08-08 03:25:35 +0800

Seen: 27 times

Last updated: Aug 08 '13

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