0

ZK 6.5.2 list multi selection with checkmark = true shows radiobox instead of checkbox

asked 2013-08-16 15:05:19 +0800

gyowanny gravatar image gyowanny
283 1 2 6

updated 2013-08-16 15:29:07 +0800

Hi,

after updating ZK libs in my pom.xml from 5.0.6 to 6.5.2 my List boxes components that are set as multi selection and checkmark = true as well are showing radio boxes instead of checkboxes as in the prior ZK version. Is this a bug or am I missing something here?

My code:

<listbox id="listModules" multiple="true" height="100%" vflex="true" checkmark="true"
                         model="${modulesForm.moduleListModel}" itemRenderer="${itemRenderer}"
                         onSelect="onAddModule" />

In my Item Renderer implementation I tried to force the list item to checkable = true, but it's still not working.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-08-16 15:39:50 +0800

gyowanny gravatar image gyowanny
283 1 2 6

Ok, I found the fix. in the getModuleListModel() method from the window composer, I've had to set the multiple=true manually for the model in order to have the checkboxes visible instead of radioboxes.

ListModelList model = new ListModelList(empresas);
model.setMultiple(true);

Thus it's not working as described in the 6.5.2's javadoc):

Notice that I'm setting the multiple=true in my zul file but it seems it's getting overrided when the model is loaded.

setCheckmark public void setCheckmark(boolean checkmark) Sets whether the check mark shall be displayed in front of each item. The check mark is a checkbox if isMultiple() returns true. It is a radio button if isMultiple() returns false.

link publish delete flag offensive edit
Your answer
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
2 followers

RSS

Stats

Asked: 2013-08-16 15:05:19 +0800

Seen: 27 times

Last updated: Aug 16 '13

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