You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Clay Lehman <cl...@medfusion.net> on 2007/10/05 23:08:42 UTC

Customizing RadioChoice

I am trying to customize RadioChoice so that it puts the options into a
nice table.  I found setPrefix and setSuffix, but I cant just do
setSuffix("&nbsp;") because I want to have a differenct prefix & suffix
based on the index (for example create a new row in a table for every
4th option).

 

getPrefix and getSuffix are final methods, so I can't override them.
Does anyone know of a way that I can accomplish this task using
RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
the list of options generated dynamically than from the HTML, if
possible.

 

Thanks for any help!

-Clay

 


Re: Customizing RadioChoice

Posted by Martijn Dashorst <ma...@gmail.com>.
/me goes back to writing about RadioGroup

On 10/5/07, Martijn Dashorst <ma...@gmail.com> wrote:
> I'd say go with RadioGroup, that is what it is intended for.
>
> The RadioChoice is intended for quick solutions, do you want more
> possibilities, use the Group.
>
> And you can just use a RepeatingView inside the Group to dynamically
> generate the Radio's
>
> Martijn
>
> On 10/5/07, Clay Lehman <cl...@medfusion.net> wrote:
> > I am trying to customize RadioChoice so that it puts the options into a
> > nice table.  I found setPrefix and setSuffix, but I cant just do
> > setSuffix("&nbsp;") because I want to have a differenct prefix & suffix
> > based on the index (for example create a new row in a table for every
> > 4th option).
> >
> >
> >
> > getPrefix and getSuffix are final methods, so I can't override them.
> > Does anyone know of a way that I can accomplish this task using
> > RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
> > the list of options generated dynamically than from the HTML, if
> > possible.
> >
> >
> >
> > Thanks for any help!
> >
> > -Clay
> >
> >
> >
> >
>
>
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0-beta3 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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


Re: Customizing RadioChoice

Posted by Martijn Dashorst <ma...@gmail.com>.
I'd say go with RadioGroup, that is what it is intended for.

The RadioChoice is intended for quick solutions, do you want more
possibilities, use the Group.

And you can just use a RepeatingView inside the Group to dynamically
generate the Radio's

Martijn

On 10/5/07, Clay Lehman <cl...@medfusion.net> wrote:
> I am trying to customize RadioChoice so that it puts the options into a
> nice table.  I found setPrefix and setSuffix, but I cant just do
> setSuffix("&nbsp;") because I want to have a differenct prefix & suffix
> based on the index (for example create a new row in a table for every
> 4th option).
>
>
>
> getPrefix and getSuffix are final methods, so I can't override them.
> Does anyone know of a way that I can accomplish this task using
> RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
> the list of options generated dynamically than from the HTML, if
> possible.
>
>
>
> Thanks for any help!
>
> -Clay
>
>
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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


RE: Customizing RadioChoice

Posted by Clay Lehman <cl...@medfusion.net>.
Actually, it looks like CheckBoxMultipleChoice already is this way -- it
only has final on the set*fix() and not on the get*fix() methods

-Clay

>+1 - and please consider the same for the CheckBoxMultipleChoice. :-)
>
>Best regards, --- Jan.


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


Re: Customizing RadioChoice

Posted by Jan Kriesten <ja...@renitence.de>.
Hi Martijn,
> I'm +1 on removing final from the get*fix methods on the RadioChoice
> component. Anyone else reading along and objecting?

+1 - and please consider the same for the CheckBoxMultipleChoice. :-)

Best regards, --- Jan.


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


Re: Customizing RadioChoice

Posted by Chris Fierer <cf...@medfusion.net>.

+1 for removing the final on the Prefix methods as well.

- Chris


Martijn Dashorst wrote:
> 
> Hmm,
> 
> Opening up the get*fix methods doesn't seem risky, but I'm not sure
> what we are going to do with the change recording. That is the only
> thing I can tell why the methods are final.
> 
> Your usecase is interesting though. In this case opening the get*fix
> methods doesn't seem to open a can of worms, other than limiting the
> backbutton versioning. But in your case the set*fix method wouldn't be
> called in the first place.
> 
> I'm +1 on removing final from the get*fix methods on the RadioChoice
> component. Anyone else reading along and objecting?
> 
> Martijn
> 
> On 10/5/07, Clay Lehman <cl...@medfusion.net> wrote:
>> I am trying to customize RadioChoice so that it puts the options into a
>> nice table.  I found setPrefix and setSuffix, but I cant just do
>> setSuffix("&nbsp;") because I want to have a differenct prefix & suffix
>> based on the index (for example create a new row in a table for every
>> 4th option).
>>
>>
>>
>> getPrefix and getSuffix are final methods, so I can't override them.
>> Does anyone know of a way that I can accomplish this task using
>> RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
>> the list of options generated dynamically than from the HTML, if
>> possible.
>>
>>
>>
>> Thanks for any help!
>>
>> -Clay
>>
>>
>>
>>
> 
> 
> -- 
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0-beta3 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Customizing-RadioChoice-tf4577618.html#a13096673
Sent from the Wicket - User mailing list archive at Nabble.com.


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


RE: Customizing RadioChoice

Posted by Clay Lehman <cl...@medfusion.net>.
Thanks for the suggestions Martijn!  For now I will look into using the
RadioGroup, but I like the idea removing final from the get*fix methods.
=)  

This way someone could make MyRadioGroup, and have an option for topdown
(default) lists or table-style lists, where they customize the
width/shape of the table.  I still want "intended for quick solutions",
just with more customizability.

-Clay

-----Original Message-----
From: Martijn Dashorst [mailto:martijn.dashorst@gmail.com] 
Sent: Friday, October 05, 2007 5:21 PM
To: users@wicket.apache.org
Subject: Re: Customizing RadioChoice

Hmm,

Opening up the get*fix methods doesn't seem risky, but I'm not sure
what we are going to do with the change recording. That is the only
thing I can tell why the methods are final.

Your usecase is interesting though. In this case opening the get*fix
methods doesn't seem to open a can of worms, other than limiting the
backbutton versioning. But in your case the set*fix method wouldn't be
called in the first place.

I'm +1 on removing final from the get*fix methods on the RadioChoice
component. Anyone else reading along and objecting?

Martijn



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


Re: Customizing RadioChoice

Posted by Martijn Dashorst <ma...@gmail.com>.
Hmm,

Opening up the get*fix methods doesn't seem risky, but I'm not sure
what we are going to do with the change recording. That is the only
thing I can tell why the methods are final.

Your usecase is interesting though. In this case opening the get*fix
methods doesn't seem to open a can of worms, other than limiting the
backbutton versioning. But in your case the set*fix method wouldn't be
called in the first place.

I'm +1 on removing final from the get*fix methods on the RadioChoice
component. Anyone else reading along and objecting?

Martijn

On 10/5/07, Clay Lehman <cl...@medfusion.net> wrote:
> I am trying to customize RadioChoice so that it puts the options into a
> nice table.  I found setPrefix and setSuffix, but I cant just do
> setSuffix("&nbsp;") because I want to have a differenct prefix & suffix
> based on the index (for example create a new row in a table for every
> 4th option).
>
>
>
> getPrefix and getSuffix are final methods, so I can't override them.
> Does anyone know of a way that I can accomplish this task using
> RadioChoice? Or will I have to go with a RadioGroup ...I'd rather have
> the list of options generated dynamically than from the HTML, if
> possible.
>
>
>
> Thanks for any help!
>
> -Clay
>
>
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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