0

MVVM Binding make invisible component [closed]

asked 2013-11-08 08:08:13 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

I am trying to disable button when the Java Utility list size is zero. But ZK Does not allowing to do. Here is the code

<a onClick="@command('ChangeAllToPending')" visible = "@load(vm.ordersList.size eq 0)">
            Change All Orders to Pending Status
        </a>

Giving the following error

org.zkoss.zk.ui.UiException: For input string: "size" at [file:/F:/MyDocuments/Java/HealthCare/Product/ProductWebApp/ProductWebApp/src/main/webapp/ZK/homepages/labhomependingorders.zul, line:8]

at org.zkoss.bind.impl.MiscUtil.mergeExceptionInfo(MiscUtil.java:175)

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by Senthilchettyin
close date 2013-11-08 09:22:42

Comments

Is it public String getSize() or public int getSize()? I should try visible="@load(vm.ordersList.size ne 0)" cause now it will be in reverse (showing when 0)

chillworld ( 2013-11-08 08:29:41 +0800 )edit

It is java List as here)

Senthilchettyin ( 2013-11-08 08:39:53 +0800 )edit

Yes psingh

Your way it is working perfect.

Senthilchettyin ( 2013-11-08 09:22:25 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-11-08 09:11:46 +0800

psingh gravatar image psingh flag of India
963 8

You can use like this

<a onClick="@command('ChangeAllToPending')" visible = "@load( empty vm.feeList)">
            Change All Orders to Pending Status
        </a>
link publish delete flag offensive edit

Question tools

Follow

RSS

Stats

Asked: 2013-11-08 08:08:13 +0800

Seen: 25 times

Last updated: Nov 08 '13

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