Revision history [back]

click to hide/show revision 1
initial version

asked 2014-11-06 08:03:22 +0800

chillworld gravatar image chillworld flag of Belgium

https://github.com/chillw...

bug in zul with @load

Hi all,

I'm working on mine new project with zk 7.0.0

Now I need to set a button disabled on 3 requirements :

  1. A specific item must be selected(selectedType).
  2. I have a list where they can drag into => list may not be empty.(dropListModel)
  3. Another list is checkmark="true" multiple="true" => must be a selection.(multipleSelectionListModel)

Note : the names are changed for simplicity.

So I created the following :

<button label="Do something" onClick="@command('commandName')" disabled="@load((vm.dropListModel.empty) || (empty vm.selectedType) || (vm.multipleSelectionListModel.selection.empty))" />

Error :

Org.zkoss.zel.impl.parser.ParseException: Encountered " "empty" "empty "" at line 1, column 24.<|Was expecting:<|    <IDENTIFIER> ...<|
at org.zkoss.zel.impl.parser.ELParser.generateParseException(ELParser.java:2215)

Changed it to :

<button label="Do something" onClick="@command('commandName')" disabled="@load(vm.dropListModel.empty)"/>

Created same error.

Created fiddle :http://zkfiddle.org/sample/3kvld74/29-parsing-error

I use a List here but List as ListModelList has the method isEmpty.

Note:

I'm not looking for a work around, I'm just reporting this issue. Possible work around is creating a method in the viewmodel or for the fiddle : disabled="@load(vm.items.size() eq 0)"

greetz chill.

bug in zul with @load

Hi all,

I'm working on mine new project with zk 7.0.0

Now I need to set a button disabled on 3 requirements :

  1. A specific item must be selected(selectedType).
  2. I have a list where they can drag into => list may not be empty.(dropListModel)
  3. Another list is checkmark="true" multiple="true" => must be a selection.(multipleSelectionListModel)

Note : the names are changed for simplicity.

So I created the following :

<button label="Do something" onClick="@command('commandName')" disabled="@load((vm.dropListModel.empty) || (empty vm.selectedType) || (vm.multipleSelectionListModel.selection.empty))" />

Error :

Org.zkoss.zel.impl.parser.ParseException: Encountered " "empty" "empty "" at line 1, column 24.<|Was expecting:<|    <IDENTIFIER> ...<|
at org.zkoss.zel.impl.parser.ELParser.generateParseException(ELParser.java:2215)

Changed it to :

<button label="Do something" onClick="@command('commandName')" disabled="@load(vm.dropListModel.empty)"/>

Created same error.

Created fiddle :http://zkfiddle.org/sample/3kvld74/29-parsing-error

I use a List here but List as ListModelList has the method isEmpty.

Note:

I'm not looking for a work around, I'm just reporting this issue. Possible work around is creating a method in the viewmodel or for the fiddle : disabled="@load(vm.items.size() eq 0)" or : disabled="@load(vm.items.isEmpty())"

greetz chill.

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