see RadioGroup.


On 10/24/05, Johannes Fahrenkrug <[EMAIL PROTECTED]> wrote:
Hi,

I'm wondering why RadioChoice.onComponentTagBody() is declared as final.
It would be great if I could override that method. Here's why:

I have custom classes for TextFields, DropDownChoices and so on. These
custom classes draw a <span class="error"> or a
<span class="no-error"> around the components depending on if they have
errors or not. That enables me to draw a red line around the components
with CSS to highlight them to the user. I do that be overriding the
onRender methods for these components.

In an easy case, that would also work with a RadioChoice.
My RadioChoice items are not right next to each other, instead they are
embedded in a table (by setting the prefix to <th align=\"left\"> and
the suffix to </th>.
If I would override the onRender method to the <span> tags around the
rendered component is this case, I'd get garbled html.

So the nicest thing would be to override onComponentTagBody and set the
<span> tags around the individual RadioChoice items.

Is there a reason why it is declared as final?

I know there's another way to solve this: set the prefix according to
the error status, for example <th align=\"left\" class=\"error\"> but
I'd rather have my own class that overrides onComponentTagBody and does
that automatically.

- Johannes.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to