Hi,
I was actually looking for integrating RadioButton with DefaultDataTable
component available in Wicket.
My requirement is, i need to show a row of data's with one column being a
RadioButton. I use DataTable component for showing list of Data's. The
number of columns is known only at runtime. This radioButton is used to
select that particular row of Data. How do i specify the name of the
component in my html. i.e
<wicket:fragment wicket:id="radioButtonFrag">
<input type="radio" wicket:id="selected"/>
</wicket:fragment>
The name of the above radio button is selected. This same named (id
=selected) radio button cannot be added again to the RadioGroup has i loop
thro... Is there a way to dynamicaly name component at runtime. I think this
is just a problem of naming the Radiobutton as the records are know only at
runtime.
Hoover, William wrote:
>
> see http://cwiki.apache.org/WICKET/using-radiogroups.html
>
> -----Original Message-----
> From: Sathish Gopal [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 06, 2008 6:07 AM
> To: [email protected]
> Subject: RadioButton inside DataTable
>
>
>
> Hi all,
>
> I'm trying to build DataTable using the Wickets DefaultDataTable
> component.
> One of the column in the list is a RadioButton component, which is used to
> select a particular row.
>
> I'm using wicket fragment feature.
>
> My html looks like this...
>
> <div>
> <table cellpadding="0" cellspacing="1" wicket:id="table"/>
> </div>
>
> <wicket:fragment wicket:id="radioChoiceFrag">
>
> <input type="radio" wicket:id="selected"/>
>
> </wicket:fragment>
>
> My fragment looks like this..
>
> public class FlightSelectionFragment extends Fragment {
> private RadioGroup radioGroup;
>
> public FlightSelectionFragment(String id, String markupId,
> MarkupContainer markupProvider) {
> super(id, markupId, markupProvider);
> radioGroup.add(new Radio("selected", new Model("")) {
> });
> }
>
> How do i add the same Radio button component (id=selected) to RadioGroup
> (id=radioChoicegroup) for multiple rows. i.e Assuming there are three rows
> in table. So i need 3 radio buttons which will be added to the same radio
> group (id=radioChoicegroup). But the component id (id=selected) cannot be
> the same for all the three rows. This gives Runtime Exception. How to
> handle
> this issue?
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16522717.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]
>
>
>
--
View this message in context:
http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16524398.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]