0

Change in 'select' mold listbox not generating change notofication

asked 2012-04-17 05:06:17 +0800

davout gravatar image davout
1435 3 18

updated 2012-04-17 05:07:46 +0800

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>


... and the matching command handler...

@Command("changeWorkspace")
public void changeWorkspace() {
   postGlobalCommand(new DataViewCommand(ORIGINATOR_PRIMARY_MENU,VIEW_PLANNING_SUMMARY,"Planning summary",getSelectedWorkspaceItem().getID()));
}


Is this a bug?

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-04-17 05:51:31 +0800

davout gravatar image davout
1435 3 18

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?

link publish delete flag offensive edit

answered 2012-04-18 09:13:43 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-04-17 05:06:17 +0800

Seen: 177 times

Last updated: Apr 18 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More