You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Steve Torrefranca <st...@branders.com> on 2007/03/23 09:10:00 UTC
t:radio inside a t:dataTable
Hi,
I have been trying to make t:radio work. Although I was able to build
this view (t;radio inside a t:dataTable)
O radio1 | text1 | O radio2 | O radio3
O radio1 | text2 | O radio2 | O radio3
O radio1 | text3 | O radio2 | O radio3
O radio1 | text4 | O radio2 | O radio3
But I could not bind the values.
Here is my code
<t:dataTable value="#{detailLeadForm.activities}" var="activities">
<f:verbatim>
<t:selectOneRadio id="actionchoice"
value="#{activities.activityFlag}" layout="spread" >
<f:selectItem itemValue="Sched" itemLabel="Sched" />
<f:selectItem itemValue="Erase" itemLabel="Erase" />
<f:selectItem itemValue="Done" itemLabel="Done" />
</t:selectOneRadio>
</f:verbatim>
<t:column>
<t:radio for="actionchoice" index="0" />
</t:column>
<t:inputText value="#{activities.activityFlag}" />
<t:column>
<t:radio for="actionchoice" index="1" />
</t:column>
<t:column>
<t:radio for="actionchoice" index="2" />
</t:column>
</t:dataTable>
How should I handle my t:radio index and for?
Thank you
-Steve
Re: t:radio inside a t:dataTable
Posted by Mike Kienenberger <mk...@gmail.com>.
Steve,
You'll probably need to use t:radio in order to get something you can
hide. That should give you the ability to specify a style on the
radio input.
On 3/26/07, Steve Torrefranca <st...@branders.com> wrote:
> changing f:verbatim to t:column I was able to get the value of the
> selected radio button.
>
> <t:dataTable value="#{detailLeadForm.activities}" var="activities">
> <t:column>
> <t:selectOneRadio id="actionchoice"
> value="#{activities.activityFlag}" layout="spread" >
> <f:selectItem itemValue="Sched" itemLabel="Sched" />
> <f:selectItem itemValue="Erase" itemLabel="Erase" />
> <f:selectItem itemValue="Done" itemLabel="Done" />
> </t:selectOneRadio>
> </t:column>
>
> ...
>
> </t:dataTable>
>
>
> Now, how do I hide these three buttons?
>
> -Steve
>
> Steve Torrefranca wrote:
> > Hi Volker,
> >
> > Removing the f:verbatim did not fix the problem.
> >
> > Could the problem be related to index and for? I have seen some
> > examples having for=":string:string" and index="#{index}" but I dont
> > exactly know how they work.
> >
> > Thank you.
> >
> > -Steve
> >
> > Volker Weber wrote:
> >> Hi,
> >>
> >> what should this f:verbatim do?
> >>
> >> there is NO t:selectOneRadio component in your view, just a string
> >> inside the verbatim.
> >>
> >> afaik you can just put the t:selectOneRadio direct into the
> >> datatable, or better
> >> replace the verbatim with f:facet.
> >>
> >> Regards,
> >> Volker
> >>
> >> 2007/3/23, Steve Torrefranca <st...@branders.com>:
> >>> Hi,
> >>>
> >>> I have been trying to make t:radio work. Although I was able to build
> >>> this view (t;radio inside a t:dataTable)
> >>>
> >>> O radio1 | text1 | O radio2 | O radio3
> >>> O radio1 | text2 | O radio2 | O radio3
> >>> O radio1 | text3 | O radio2 | O radio3
> >>> O radio1 | text4 | O radio2 | O radio3
> >>>
> >>> But I could not bind the values.
> >>>
> >>>
> >>> Here is my code
> >>>
> >>> <t:dataTable value="#{detailLeadForm.activities}" var="activities">
> >>> <f:verbatim>
> >>> <t:selectOneRadio id="actionchoice"
> >>> value="#{activities.activityFlag}" layout="spread" >
> >>> <f:selectItem itemValue="Sched" itemLabel="Sched" />
> >>> <f:selectItem itemValue="Erase" itemLabel="Erase" />
> >>> <f:selectItem itemValue="Done" itemLabel="Done" />
> >>> </t:selectOneRadio>
> >>> </f:verbatim>
> >>>
> >>> <t:column>
> >>> <t:radio for="actionchoice" index="0" />
> >>> </t:column>
> >>> <t:inputText value="#{activities.activityFlag}" />
> >>> <t:column>
> >>> <t:radio for="actionchoice" index="1" />
> >>> </t:column>
> >>> <t:column>
> >>> <t:radio for="actionchoice" index="2" />
> >>> </t:column>
> >>> </t:dataTable>
> >>>
> >>> How should I handle my t:radio index and for?
> >>>
> >>> Thank you
> >>>
> >>> -Steve
> >>>
> >>
> >
> >
>
>
Re: t:radio inside a t:dataTable
Posted by Steve Torrefranca <st...@branders.com>.
changing f:verbatim to t:column I was able to get the value of the
selected radio button.
<t:dataTable value="#{detailLeadForm.activities}" var="activities">
<t:column>
<t:selectOneRadio id="actionchoice"
value="#{activities.activityFlag}" layout="spread" >
<f:selectItem itemValue="Sched" itemLabel="Sched" />
<f:selectItem itemValue="Erase" itemLabel="Erase" />
<f:selectItem itemValue="Done" itemLabel="Done" />
</t:selectOneRadio>
</t:column>
...
</t:dataTable>
Now, how do I hide these three buttons?
-Steve
Steve Torrefranca wrote:
> Hi Volker,
>
> Removing the f:verbatim did not fix the problem.
>
> Could the problem be related to index and for? I have seen some
> examples having for=":string:string" and index="#{index}" but I dont
> exactly know how they work.
>
> Thank you.
>
> -Steve
>
> Volker Weber wrote:
>> Hi,
>>
>> what should this f:verbatim do?
>>
>> there is NO t:selectOneRadio component in your view, just a string
>> inside the verbatim.
>>
>> afaik you can just put the t:selectOneRadio direct into the
>> datatable, or better
>> replace the verbatim with f:facet.
>>
>> Regards,
>> Volker
>>
>> 2007/3/23, Steve Torrefranca <st...@branders.com>:
>>> Hi,
>>>
>>> I have been trying to make t:radio work. Although I was able to build
>>> this view (t;radio inside a t:dataTable)
>>>
>>> O radio1 | text1 | O radio2 | O radio3
>>> O radio1 | text2 | O radio2 | O radio3
>>> O radio1 | text3 | O radio2 | O radio3
>>> O radio1 | text4 | O radio2 | O radio3
>>>
>>> But I could not bind the values.
>>>
>>>
>>> Here is my code
>>>
>>> <t:dataTable value="#{detailLeadForm.activities}" var="activities">
>>> <f:verbatim>
>>> <t:selectOneRadio id="actionchoice"
>>> value="#{activities.activityFlag}" layout="spread" >
>>> <f:selectItem itemValue="Sched" itemLabel="Sched" />
>>> <f:selectItem itemValue="Erase" itemLabel="Erase" />
>>> <f:selectItem itemValue="Done" itemLabel="Done" />
>>> </t:selectOneRadio>
>>> </f:verbatim>
>>>
>>> <t:column>
>>> <t:radio for="actionchoice" index="0" />
>>> </t:column>
>>> <t:inputText value="#{activities.activityFlag}" />
>>> <t:column>
>>> <t:radio for="actionchoice" index="1" />
>>> </t:column>
>>> <t:column>
>>> <t:radio for="actionchoice" index="2" />
>>> </t:column>
>>> </t:dataTable>
>>>
>>> How should I handle my t:radio index and for?
>>>
>>> Thank you
>>>
>>> -Steve
>>>
>>
>
>
Re: t:radio inside a t:dataTable
Posted by Volker Weber <v....@inexso.de>.
Hi Steve,
you can try move the t:selectOneRadio out of the datatable (e.g. as
facet into f:view) and use absolute ids at the t:radio tags.
see this thread
http://www.mail-archive.com/users@myfaces.apache.org/msg16561.html
Regards,
Volker
2007/3/26, Steve Torrefranca <st...@branders.com>:
> Hi Volker,
>
> Removing the f:verbatim did not fix the problem.
>
> Could the problem be related to index and for? I have seen some
> examples having for=":string:string" and index="#{index}" but I dont
> exactly know how they work.
>
> Thank you.
>
> -Steve
>
> Volker Weber wrote:
> > Hi,
> >
> > what should this f:verbatim do?
> >
> > there is NO t:selectOneRadio component in your view, just a string
> > inside the verbatim.
> >
> > afaik you can just put the t:selectOneRadio direct into the datatable,
> > or better
> > replace the verbatim with f:facet.
> >
> > Regards,
> > Volker
> >
> > 2007/3/23, Steve Torrefranca <st...@branders.com>:
> >> Hi,
> >>
> >> I have been trying to make t:radio work. Although I was able to build
> >> this view (t;radio inside a t:dataTable)
> >>
> >> O radio1 | text1 | O radio2 | O radio3
> >> O radio1 | text2 | O radio2 | O radio3
> >> O radio1 | text3 | O radio2 | O radio3
> >> O radio1 | text4 | O radio2 | O radio3
> >>
> >> But I could not bind the values.
> >>
> >>
> >> Here is my code
> >>
> >> <t:dataTable value="#{detailLeadForm.activities}" var="activities">
> >> <f:verbatim>
> >> <t:selectOneRadio id="actionchoice"
> >> value="#{activities.activityFlag}" layout="spread" >
> >> <f:selectItem itemValue="Sched" itemLabel="Sched" />
> >> <f:selectItem itemValue="Erase" itemLabel="Erase" />
> >> <f:selectItem itemValue="Done" itemLabel="Done" />
> >> </t:selectOneRadio>
> >> </f:verbatim>
> >>
> >> <t:column>
> >> <t:radio for="actionchoice" index="0" />
> >> </t:column>
> >> <t:inputText value="#{activities.activityFlag}" />
> >> <t:column>
> >> <t:radio for="actionchoice" index="1" />
> >> </t:column>
> >> <t:column>
> >> <t:radio for="actionchoice" index="2" />
> >> </t:column>
> >> </t:dataTable>
> >>
> >> How should I handle my t:radio index and for?
> >>
> >> Thank you
> >>
> >> -Steve
> >>
> >
>
>
Re: t:radio inside a t:dataTable
Posted by Steve Torrefranca <st...@branders.com>.
Hi Volker,
Removing the f:verbatim did not fix the problem.
Could the problem be related to index and for? I have seen some
examples having for=":string:string" and index="#{index}" but I dont
exactly know how they work.
Thank you.
-Steve
Volker Weber wrote:
> Hi,
>
> what should this f:verbatim do?
>
> there is NO t:selectOneRadio component in your view, just a string
> inside the verbatim.
>
> afaik you can just put the t:selectOneRadio direct into the datatable,
> or better
> replace the verbatim with f:facet.
>
> Regards,
> Volker
>
> 2007/3/23, Steve Torrefranca <st...@branders.com>:
>> Hi,
>>
>> I have been trying to make t:radio work. Although I was able to build
>> this view (t;radio inside a t:dataTable)
>>
>> O radio1 | text1 | O radio2 | O radio3
>> O radio1 | text2 | O radio2 | O radio3
>> O radio1 | text3 | O radio2 | O radio3
>> O radio1 | text4 | O radio2 | O radio3
>>
>> But I could not bind the values.
>>
>>
>> Here is my code
>>
>> <t:dataTable value="#{detailLeadForm.activities}" var="activities">
>> <f:verbatim>
>> <t:selectOneRadio id="actionchoice"
>> value="#{activities.activityFlag}" layout="spread" >
>> <f:selectItem itemValue="Sched" itemLabel="Sched" />
>> <f:selectItem itemValue="Erase" itemLabel="Erase" />
>> <f:selectItem itemValue="Done" itemLabel="Done" />
>> </t:selectOneRadio>
>> </f:verbatim>
>>
>> <t:column>
>> <t:radio for="actionchoice" index="0" />
>> </t:column>
>> <t:inputText value="#{activities.activityFlag}" />
>> <t:column>
>> <t:radio for="actionchoice" index="1" />
>> </t:column>
>> <t:column>
>> <t:radio for="actionchoice" index="2" />
>> </t:column>
>> </t:dataTable>
>>
>> How should I handle my t:radio index and for?
>>
>> Thank you
>>
>> -Steve
>>
>
Re: t:radio inside a t:dataTable
Posted by Volker Weber <v....@inexso.de>.
Hi,
what should this f:verbatim do?
there is NO t:selectOneRadio component in your view, just a string
inside the verbatim.
afaik you can just put the t:selectOneRadio direct into the datatable, or better
replace the verbatim with f:facet.
Regards,
Volker
2007/3/23, Steve Torrefranca <st...@branders.com>:
> Hi,
>
> I have been trying to make t:radio work. Although I was able to build
> this view (t;radio inside a t:dataTable)
>
> O radio1 | text1 | O radio2 | O radio3
> O radio1 | text2 | O radio2 | O radio3
> O radio1 | text3 | O radio2 | O radio3
> O radio1 | text4 | O radio2 | O radio3
>
> But I could not bind the values.
>
>
> Here is my code
>
> <t:dataTable value="#{detailLeadForm.activities}" var="activities">
> <f:verbatim>
> <t:selectOneRadio id="actionchoice"
> value="#{activities.activityFlag}" layout="spread" >
> <f:selectItem itemValue="Sched" itemLabel="Sched" />
> <f:selectItem itemValue="Erase" itemLabel="Erase" />
> <f:selectItem itemValue="Done" itemLabel="Done" />
> </t:selectOneRadio>
> </f:verbatim>
>
> <t:column>
> <t:radio for="actionchoice" index="0" />
> </t:column>
> <t:inputText value="#{activities.activityFlag}" />
> <t:column>
> <t:radio for="actionchoice" index="1" />
> </t:column>
> <t:column>
> <t:radio for="actionchoice" index="2" />
> </t:column>
> </t:dataTable>
>
> How should I handle my t:radio index and for?
>
> Thank you
>
> -Steve
>