You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Brian Edwards <br...@gmail.com> on 2008/04/03 15:37:51 UTC

CheckBoxMultipleChoice with sections

I am trying to create a CheckBoxMultipleChoice subclass that supports
sections.  The class of items in the list will have a section name and
a description.  The list will guarantee that it is grouped by
sections.  My idea was to override getPrefix(), call a getter to get
the current choice, and if the section has changed print out the new
section name as part of the prefix.  The problem I ran into is that
the current choice is not accessible, because it is local to the
onComponentTagBody method.  My current solution is to copy and paste
all of the code from CheckBoxMultipleChoice into my own class and hack
away, but I'd like to avoid this if possible.

-- 
Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: CheckBoxMultipleChoice with sections

Posted by Igor Vaynberg <ig...@gmail.com>.
you could use CheckGroup/Check components ....

-igor


On Thu, Apr 3, 2008 at 6:37 AM, Brian Edwards
<br...@gmail.com> wrote:
> I am trying to create a CheckBoxMultipleChoice subclass that supports
>  sections.  The class of items in the list will have a section name and
>  a description.  The list will guarantee that it is grouped by
>  sections.  My idea was to override getPrefix(), call a getter to get
>  the current choice, and if the section has changed print out the new
>  section name as part of the prefix.  The problem I ran into is that
>  the current choice is not accessible, because it is local to the
>  onComponentTagBody method.  My current solution is to copy and paste
>  all of the code from CheckBoxMultipleChoice into my own class and hack
>  away, but I'd like to avoid this if possible.
>
>  --
>  Brian
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org