-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Using R6.0.2...
I have a MVVM ZK page which is using form based validation. The ZK form is passed a bean which itself is a property of the main VM class, like...
// main MVVM class public class ResourceCategoryListEditVM extends AbstractResourceCategoryVM { ... ... private ResourceCategoryEditDO fEdit = new ResourceCategoryEditDO(); ... ... } // subordinate bena hoding all form data properties public class ResourceCategoryEditDO extends ResourceCategoryDO { ... <groupbox form="@id('fx') @load(vm.edit) @save(vm.edit,before='save')" >
<bandbox id="parentCategoryBB" readonly="true" value="@bind(fx.parentCategoryTitle) @validator(vm.parentCategoryValidator)"> <bandpopup width="200px" height="250px"> <tree model="@load(fx.parentCategoryModel)" selectedItem="@bind(fx.selectedParentCategory)" checkmark="true" vflex="true" onSelect="parentCategoryBB.close();"> <treecols> <treecol label="Title" /> </treecols> <template name="model" var="p"> <treeitem> <treerow> <treecell label="@load(p.data.title)" /> </treerow> </treeitem> </template> </tree> </bandpopup> </bandbox>
public class ResourceCategoryListEditVM extends AbstractResourceCategoryVM { ... ... private ResourceCategoryEditDO fEdit = new ResourceCategoryEditDO(); ... ... } public class ResourceCategoryEditDO extends ResourceCategoryDO { ... ... private String fParentCategoryTitle; ... ... @DependsOn("selectedParentCategory") public String getParentCategoryTitle() { return fParentCategoryTitle; } ... ... }
Hi,
Sorry for late response.
Can you try using @Command in onSelect event registered to tree component, and update the value in the command?
Asked: 2012-09-07 08:53:32 +0800
Seen: 154 times
Last updated: Sep 14 '12