Re: Question about IChoiceRenderer

2018-10-30 Thread Martin Terra
I would definitely recommend leveraging the class hierarcy of DropDownChoice/AbstractSingleSelectChoice in case you are using a single select, and if it is multi select then respective ListMultipleChoice. This way you can leverage the existing implementation of isSelected etc. ** Martin ti 30.

Re: Question about IChoiceRenderer

2018-10-30 Thread Claudia Hirt
Thanks for the tip Martin Terra! And thank you for the example code Martin Grigorov! Good to know I'm on the right track. I still have one proplem left, I know it really is a minor thing. I developed a framework component for a group selectbox which takes a HashMap containing the optgroups

Re: Question about IChoiceRenderer

2018-10-30 Thread Martin Terra
Also, if you need optrgoups and styling while needing to keep it simple, you can implement IStyledChoiceRenderer and extend DropDownChoice with some subtle changes. ** Martin ti 30. lokak. 2018 klo 17.04

Re: Question about IChoiceRenderer

2018-10-30 Thread Martin Grigorov
Hi, DropDownChoice component should be used when you have a list of objects which you want to render in an HTML select element without fancy things like option grouping and styling. If you need to do grouping and/or styling then you need to use Select and add SelectOption for each of your

Re: Question about IChoiceRenderer

2018-10-30 Thread Claudia Hirt
Hi, I use select to create a selectbox containing optgroups which is not possible with abstractchoice as far as i know. And i want to also use choice renderer for this “groupselectbox component” to have the same behaviour as in abstract choice. Maybe I’m wrong with the whole concept. What is

Re: Question about IChoiceRenderer

2018-10-30 Thread Martin Grigorov
Hi Claudia, I do not quite understand your question/suggestion. IChoiceRenderer is used by AbstractChoice and its specializations. "T object" is your type, so you should decide how to construct a stable id out of it. In case you cannot get such id then you may use the passed index, but in this

Re: question about IChoiceRenderer#getIdValue

2009-06-08 Thread Igor Vaynberg
no its not really safe if the changes to locale resort the list. -igor On Mon, Jun 8, 2009 at 6:12 PM, Ian MacLartyian.macla...@gmail.com wrote: Hello, I wonder if someone could clarify when it is safe to use the index as the value for IChoiceRenderer#getIdValue.  The documentation says that

Re: question about IChoiceRenderer#getIdValue

2009-06-08 Thread Ian MacLarty
On Tue, Jun 9, 2009 at 11:23 AM, Igor Vaynbergigor.vaynb...@gmail.com wrote: no its not really safe if the changes to locale resort the list. Okay, thanks. Ian. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org