-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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 :
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.
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.
2 | No.2 Revision |
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 :
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.
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.