-
FEATURED COMPONENTS
First time here? Check out the FAQ!
For ZK6 - I have a select mold listbox in a window that has three listbox elements.
If the listbox starts with the middle item selected (i.e. index 1) then when I select the last item in the list (i.e. index 2) a change notification is NOT being generated.
Here's the zul code...
<listbox mold="select" width="100%" model="@load(vm.workspaces)" selectedItem="@bind(vm.selectedWorkspaceItem)" disabled="@load(vm.workspaceSelectorDisabled)" onSelect="@command('changeWorkspace')"> <listhead> <listheader ></listheader> </listhead> <template name="model"> <listitem> <listcell label="${each.title}" ></listcell> </listitem> </template> </listbox>
@Command("changeWorkspace") public void changeWorkspace() { postGlobalCommand(new DataViewCommand(ORIGINATOR_PRIMARY_MENU,VIEW_PLANNING_SUMMARY,"Planning summary",getSelectedWorkspaceItem().getID())); }
I wondering if this 'bug' is something to do with how you are supposed to setup a 'select' mold listbox?
If the select mold listbox is meant to have a starting selection, how are you supposed to set this using MVVM?
I posted a bug here, http://tracker.zkoss.org/browse/ZK-1070
you could solve it by remove listhead since it is not necessary in listbox/mold-select before the fixing of the bug.
Asked: 2012-04-17 05:06:17 +0800
Seen: 177 times
Last updated: Apr 18 '12