Thanks for your reply. I've taken a closer look to those components but I
didn't find a solution.
I've tried to implement onComponentTag in SelectOptions but it didn't work
too.

Maybe you could give me a more detailed hint on what you are pointing to?

Best regards
Torben


igor.vaynberg wrote:
> 
> see Select and SelectOption and SelectOptions components
> 
> -igor
> 
> On Fri, Mar 5, 2010 at 6:30 AM, Torben Berger <[email protected]> wrote:
>> Hi,
>> I'm trying to write a dynamic Select with optgroups.
>>
>> Therefore I've got a ListView where I want to set the label of the
>> optgroup with the onComponentTag method.
>> Everything is working except of setting this label.  The onComponentTag
>> method is never called.
>>
>> Maybe someone can give me a hint how to resolve this problem. What am I
>> doing wrong?
>>
>> This is my Select:
>>
>> private Select = new Select("select", new PropertyModel<T>(this,
>> "selectedOption"));
>>
>> ListView<Collection<T>> optGroups = new
>> ListView<Collection<T>>("optGroups", groups) {
>>
>>           �...@override
>>            protected void populateItem(ListItem<Collection<T>> item) {
>>                item.add(new SelectOptions<T>("options", new
>> ArrayList<T>(item.getModelObject()), renderer));
>>            }
>>
>>           �...@override
>>            protected void onComponentTag(final ComponentTag tag) {
>>                super.onComponentTag(tag);
>>                tag.put("label", "Foo");
>>            }
>>        };
>>        select.add(optGroups);
>>
>>        add(select);
>>
>> And the markup:
>>
>> <select wicket:id="select">
>>  <optgroup wicket:id="optGroups">
>>    <wicket:container wicket:id="options">
>>      <option wicket:id="option"></option>
>>    </wicket:container>
>>  </optgroup>
>> </select>
>>
>>
>> Best regards,
>> Torben
>>
>>
>> --
>> GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
>> http://portal.gmx.net/de/go/dsl02
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-with-onComponentTag-in-a-ListView-tp27794610p27818782.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to