Hi I have created a select one choice component which should have many items, and as I have created select one choice in backing bean so I am left with no other choice but to do it in this way only.
Instead of asking the question, if you can give, me a solution I will be thankful. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jakob Korherr Sent: 15 February 2010 15:04 To: MyFaces Discussion Subject: Re: problem with <t:selectItems> Hi, What exactly do you want to do? Create an instance of the component of <t:selectItems> in the managed bean? If yes - why and for what do you need the instance? Usually you do not create component instances in backing beans, the view does that for you! Regards, Jakob 2010/2/15 Krishna K. Pandit <[email protected]> > Hi All > > > > Can any one tell me how to create <t:selectItems> in backing bean. > > It's not working with some of its methods. > > > > setItemLabel > > setItemValue > > > > please see the code below for refrence. > > > > > > > > org.apache.myfaces.custom.selectitems.UISelectItems uisi; > > public UISelectItems getDynamicUISelectItems(){ > > uisi = (UISelectItems) > app.createComponent(UISelectItems.COMPONENT_TYPE); > > uisi.setValue(getListBox()); > > uisi.setVar("itr"); > > > > uisi.setItemLabel("#{itr.id}"); //these takes a parameter > of type object but rendering > > uisi.setItemValue("#{itr.name}"); //it will just print the > string i.e #{itr.id} > > > > return uisi; > > } > > > > > > Thanks > > Krishna Kumar Pandit > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the sender by email > reply and delete it from your system. > The integrity and security of this email cannot be guaranteed on the > Internet. > > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender by email reply and delete it from your system. The integrity and security of this email cannot be guaranteed on the Internet.

