see Select, SelectOption, SelectOptions in wicket-extensions. that
should give you complete control over the markup.

-igor


On Jan 25, 2008 4:47 PM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote:
>
> Is there anyway to control the rendering of a dropdownchoice?
> I don't mean implementing IChoiceRenderer but to set style on option tag in
> select parent tag.
> I tried to indent the name in a select tag by implementing the
> IChoiceRenderer but it doens't work.
> See getDisplayValue
>
>
>
>  class TestChoiceRenderer implements IChoiceRenderer {
>
>         public Object getDisplayValue(Object object) {
>             // I don't know if it can be anything other...??
>             if (object instanceof se.boardstore.model.Category) {
>                 se.boardstore.model.Category so =
> (se.boardstore.model.Category) object;
>                 if( ! so.isParent() ) {
>                         return "  " + so.getName();
>                 }else{
>                         return so.getName();
>                 }
>
>
>             }
>             return null;
>         }
>
>         public String getIdValue(Object key, int index) {
>             // I don't know if it can be anything other...??
>             if (key instanceof se.boardstore.model.Category) {
>                 se.boardstore.model.Category selectOption =
> (se.boardstore.model.Category) key;
>                 return selectOption.getId().toString();
>
>             }
>             return null;
>         }
>
>     }
>
> --
> View this message in context: 
> http://www.nabble.com/Controlling-render-for-DropDownChoice-tp15100129p15100129.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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to