-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Oke this is what I think you want to change is:
<combobox model="@load(vm.nodeTypeList)" selectedItem="@bind(vm.item.nodeTypeId) @converter(vm.comboboxSelectedItemConverter)" autocomplete="false" readonly="true" width="150px" autodrop="true" mold="rounded" buttonVisible="true" placeholder="Select One" constraint="no empty">
<template name="model" var="model">
<comboitem value="@load(model.id)" label="@load(model.name)" />
</template>
</combobox>
So you want that the @bind(vm.item.nodeTypeId) works. In your vm I don't see a getItem. You could better do :
selectedItem="@bind(vm.selectedNode)"
and in your vm :
private Node node;
public vois setSelectedNode(Node node) {
this.node = node;
}
public Node getSelectedNode() {
return node;
}
Then if you need somewhere your Node in your zul you just need to do an @load(vm.selectedNode)
or if you need it in you java class its also present there.
Greetz chill.
2 | No.2 Revision |
Oke this is what I think you want to change is:
<combobox model="@load(vm.nodeTypeList)" selectedItem="@bind(vm.item.nodeTypeId) @converter(vm.comboboxSelectedItemConverter)" autocomplete="false" readonly="true" width="150px" autodrop="true" mold="rounded" buttonVisible="true" placeholder="Select One" constraint="no empty">
<template name="model" var="model">
<comboitem value="@load(model.id)" label="@load(model.name)" />
</template>
</combobox>
So you want that the @bind(vm.item.nodeTypeId) works. In your vm I don't see a getItem. You could better do :
selectedItem="@bind(vm.selectedNode)"
selectedItem="@bind(vm.selectedNodeType)"
and in your vm :
private Node node;
NodeType nodeType;
public vois setSelectedNode(Node node) setSelectedNodeType(NodeType nodeType) {
this.node this.nodeType = node;
nodeType;
}
public Node getSelectedNode() NodeType getSelectedNodeType() {
return node;
nodeType;
}
Then if you need somewhere your Node NodeType in your zul you just need to do an @load(vm.selectedNode)@load(vm.selectedNodeType)
or if you need it in you java class its also present there.
Greetz chill.
3 | No.3 Revision |
Oke this is what I think you want to change is:
<combobox model="@load(vm.nodeTypeList)" selectedItem="@bind(vm.item.nodeTypeId) @converter(vm.comboboxSelectedItemConverter)" autocomplete="false" readonly="true" width="150px" autodrop="true" mold="rounded" buttonVisible="true" placeholder="Select One" constraint="no empty">
<template name="model" var="model">
<comboitem value="@load(model.id)" label="@load(model.name)" />
</template>
</combobox>
So you want that the @bind(vm.item.nodeTypeId) works. In your vm I don't see a getItem. You could better do :
selectedItem="@bind(vm.selectedNodeType)"
and in your vm :
private NodeType nodeType;
public vois setSelectedNodeType(NodeType nodeType) {
this.nodeType = nodeType;
}
public NodeType getSelectedNodeType() {
return nodeType;
}
Then if you need somewhere your NodeType in your zul you just need to do an @load(vm.selectedNodeType)
or if you need it in you java class its also present there.
edit: If the nodeTypelist doesn't have items whats the output of this change? :
this.nodeTypeList = this.nodeTypeBiz.findAll();
System.out.println(nodeTypeList.iterator().hasNext());
this.hierarchyTypeList = this.hierarchyTypeBiz.findAll();
see in you output console that this is true. otherwise is your collection empty and normal that your combobox is empty.
Greetz chill.
4 | No.4 Revision |
Oke this is what I think you want to change is:
<combobox model="@load(vm.nodeTypeList)" selectedItem="@bind(vm.item.nodeTypeId) @converter(vm.comboboxSelectedItemConverter)" autocomplete="false" readonly="true" width="150px" autodrop="true" mold="rounded" buttonVisible="true" placeholder="Select One" constraint="no empty">
<template name="model" var="model">
<comboitem value="@load(model.id)" label="@load(model.name)" />
</template>
</combobox>
So you want that the @bind(vm.item.nodeTypeId) works. In your vm I don't see a getItem. You could better do :
selectedItem="@bind(vm.selectedNodeType)"
<combobox model="@load(vm.nodeTypeList)" selectedItem="@bind(fx.nodeType) autocomplete="false" readonly="true" width="150px" autodrop="true" mold="rounded" buttonVisible="true" placeholder="Select One" constraint="no empty">
and in your vm :
private NodeType nodeType;
public vois setSelectedNodeType(NodeType nodeType) {
this.nodeType = nodeType;
}
public NodeType getSelectedNodeType() {
return nodeType;
}
Then if you need somewhere your NodeType in your zul you just need to do an @load(vm.selectedNodeType)
or if you need it in you java class its also present there.
edit: If the nodeTypelist doesn't have items whats the output of this change? :
this.nodeTypeList = this.nodeTypeBiz.findAll();
System.out.println(nodeTypeList.iterator().hasNext());
this.hierarchyTypeList = this.hierarchyTypeBiz.findAll();
see in you output console that this is true. otherwise is your collection empty and normal that your combobox is empty.
Greetz chill.