0

Combobbox selectedItem issues. Unsupported child for Combobox: <Listitem null>

asked 2013-08-15 17:32:27 +0800

jatindersingh gravatar image jatindersingh
93 5
http://javaj2eehub.com/

Hi There,

I have requirement to customize the combobox. in my list i have 5 -10 combobox and i want when my combobox render the item it takes from the db i did this by extending combobox now next i am facing issue in case i am going to give some default value for selecctedItem. it gives the following error when the page get loaded "Unsupported child for Combobox: <listitem null="">"...is there any body can help me to resolved this issue.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-08-15 17:55:16 +0800

d2013 gravatar image d2013
21 1

I'm not sure if this is the issue, but I've had a similar problem. I had to set the selected index after the combobox was rendered by listening to the onAfterRender event.

@Listen("onAfterRender = #myCombobox")
public void afterRenderMyCombobox() {
    myCombobox.setSelectedIndex(myDefaultIndex);
}
link publish delete flag offensive edit

Comments

no this is not the issue. what i am doing i set the model in JavaCode and then in zul i am using selectedItem="@bind('vm.color'). that is my scenario.

jatindersingh ( 2013-08-15 18:03:26 +0800 )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
1 follower

RSS

Stats

Asked: 2013-08-15 17:32:27 +0800

Seen: 38 times

Last updated: Aug 15 '13

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