afaik, there is no way to style options of an AbstractChoice (and it's
descendants).
i could imagine 3 ways to add this (although i don't know which would be the
most wicket-like way)

1) expand IChoiceRenderer
add methods like String getClass(), String getStyle() to the IChoiceRenderer
interface.
this will definitely break existing code, and is probably not the best way
to go

2) create new interface IStyledChoiceRenderer extending IChoiceRenderer
add the mentioned methods to the new interface.
things to do in AbstractChoice.appendOptionHtml:
+check, whether the renderer is instanceof IStyledChoiceRenderer
+add class and/or style attribute if the returned string is not null and
length>0

3) expand AbstractChoice
add the mentioned methods (params like the method isDisabled()) to the class
returning an empty string as the default implementation
allowing to override these methods if needed.


any thoughts from experienced users/devs?

gerolf

p.s.: i should probably add a jira issue.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to