asked
2013-11-24 12:10:05 +0800
davout 1435 ● 3 ● 18 I'm getting an error:
Property 'selectedItems' not writable on type org.zkoss.zul.Tree
... on the following zul...
<tree
model="@load(vm.categories)" checkmark="true"
multiple="true" width="100%" vflex="true" selectedItems="@bind(vm.selectedCategories)">
<treecols>
<treecol
label="" />
</treecols>
<template name="model"
var="c">
<treeitem
checkable="@load(c.data.selectable)"
selected="@load(c.data.selected)" >
<treerow>
<treecell
label="@load(c.data.title)" />
</treerow>
</treeitem>
</template>
</tree>
... with the following mvvm class...
public abstract class AbstractAllResourcePricesListVM extends AbstractDataViewVM implements PageListModelErrorHandler {
@WireVariable
protected ResourcePriceManager resourcePriceManager;
@WireVariable
protected ResourceCategoryManager resourceCategoryManager;
private AllResourcePricesPageListModel fPrices;
private ResultSetOrder fResultSetOrder;
private SearchCriteria fSearchCriteria;
private DefaultTreeModel<DefaultTreeNode<SelectableTitledDO>> fCategories;
private Set<SelectableTitledDO> fSelectedCategories;
**
Any suggestions?
I've tried this another way, by putting bindings on both the tree model and the tree item 'selected' property and in both cases the binding is NOT updating the underlying model.
davout ( 2013-11-24 13:14:32 +0800 )edit