You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Zigc Junk <zi...@gmail.com> on 2008/06/16 17:48:18 UTC

[trinidad] tr:iterator

Hi,

I have a tr:tableLayout. Since the number of rows changes, I use
tr:iterator to enclose tr:rowLayout. One of the columns contains radio
buttons. Therefore, the markup looks like

          <tr:selectOneRadio value="#{AccountBean.selectedCreditCard}"
required="yes">
            <tr:iterator value="#{AccountBean.creditCards}" var="item">
              <trh:rowLayout>
                <trh:cellFormat>
                  <f:selectItem itemValue="#{item.id}"/>
                </trh:cellFormat>
               </trh:rowLayout>
               ..........
            </tr:iterator>
          </tr:selectOneRadio>

The problem is the radio buttons does not show up. In other words,
tr:iterator does not work inside tr:selectOneRadio. Please help.

thanks

Bill

AW: [trinidad] tr:iterator

Posted by Döring Markus <Ma...@tcc-products.de>.
If i remember correctly, <tr:forEach> is only available in a non facelets WebApp.
If you are using facelets you should use <c:forEach>.

-----Ursprüngliche Nachricht-----
Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] Im Auftrag von Matthias Wessendorf
Gesendet: Montag, 16. Juni 2008 23:11
An: MyFaces Discussion
Betreff: Re: [trinidad] tr:iterator

On Mon, Jun 16, 2008 at 11:44 AM, Zigc Junk <zi...@gmail.com> wrote:
> 1. It looks to me that tr:forEach is not available anymore. Whenever I
> use it, I got an exception.

what type of an exception are you getting ?
It is available in trunk:
-http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/conf/META-INF/tr-base.tld?revision=620427&view=markup
-http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java?revision=605856&view=markup

-Matthias

>
> 2. tr:selecteBooleanRadio works fine.
>
> Thanks for the help.
>
> Bill
>
> On Mon, Jun 16, 2008 at 1:10 PM, Matthias Wessendorf <ma...@apache.org> wrote:
>> Hello,
>>
>> try tr:forEach. But I doubt that the trh tags will work
>>
>> -Matthias
>>
>> On Mon, Jun 16, 2008 at 8:48 AM, Zigc Junk <zi...@gmail.com> wrote:
>>> Hi,
>>>
>>> I have a tr:tableLayout. Since the number of rows changes, I use
>>> tr:iterator to enclose tr:rowLayout. One of the columns contains radio
>>> buttons. Therefore, the markup looks like
>>>
>>>          <tr:selectOneRadio value="#{AccountBean.selectedCreditCard}"
>>> required="yes">
>>>            <tr:iterator value="#{AccountBean.creditCards}" var="item">
>>>              <trh:rowLayout>
>>>                <trh:cellFormat>
>>>                  <f:selectItem itemValue="#{item.id}"/>
>>>                </trh:cellFormat>
>>>               </trh:rowLayout>
>>>               ..........
>>>            </tr:iterator>
>>>          </tr:selectOneRadio>
>>>
>>> The problem is the radio buttons does not show up. In other words,
>>> tr:iterator does not work inside tr:selectOneRadio. Please help.
>>>
>>> thanks
>>>
>>> Bill
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> mail: matzew-at-apache-dot-org
>>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [trinidad] tr:iterator

Posted by Matthias Wessendorf <ma...@apache.org>.
On Mon, Jun 16, 2008 at 11:44 AM, Zigc Junk <zi...@gmail.com> wrote:
> 1. It looks to me that tr:forEach is not available anymore. Whenever I
> use it, I got an exception.

what type of an exception are you getting ?
It is available in trunk:
-http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/conf/META-INF/tr-base.tld?revision=620427&view=markup
-http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java?revision=605856&view=markup

-Matthias

>
> 2. tr:selecteBooleanRadio works fine.
>
> Thanks for the help.
>
> Bill
>
> On Mon, Jun 16, 2008 at 1:10 PM, Matthias Wessendorf <ma...@apache.org> wrote:
>> Hello,
>>
>> try tr:forEach. But I doubt that the trh tags will work
>>
>> -Matthias
>>
>> On Mon, Jun 16, 2008 at 8:48 AM, Zigc Junk <zi...@gmail.com> wrote:
>>> Hi,
>>>
>>> I have a tr:tableLayout. Since the number of rows changes, I use
>>> tr:iterator to enclose tr:rowLayout. One of the columns contains radio
>>> buttons. Therefore, the markup looks like
>>>
>>>          <tr:selectOneRadio value="#{AccountBean.selectedCreditCard}"
>>> required="yes">
>>>            <tr:iterator value="#{AccountBean.creditCards}" var="item">
>>>              <trh:rowLayout>
>>>                <trh:cellFormat>
>>>                  <f:selectItem itemValue="#{item.id}"/>
>>>                </trh:cellFormat>
>>>               </trh:rowLayout>
>>>               ..........
>>>            </tr:iterator>
>>>          </tr:selectOneRadio>
>>>
>>> The problem is the radio buttons does not show up. In other words,
>>> tr:iterator does not work inside tr:selectOneRadio. Please help.
>>>
>>> thanks
>>>
>>> Bill
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> mail: matzew-at-apache-dot-org
>>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [trinidad] tr:iterator

Posted by Zigc Junk <zi...@gmail.com>.
1. It looks to me that tr:forEach is not available anymore. Whenever I
use it, I got an exception.

2. tr:selecteBooleanRadio works fine.

Thanks for the help.

Bill

On Mon, Jun 16, 2008 at 1:10 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> Hello,
>
> try tr:forEach. But I doubt that the trh tags will work
>
> -Matthias
>
> On Mon, Jun 16, 2008 at 8:48 AM, Zigc Junk <zi...@gmail.com> wrote:
>> Hi,
>>
>> I have a tr:tableLayout. Since the number of rows changes, I use
>> tr:iterator to enclose tr:rowLayout. One of the columns contains radio
>> buttons. Therefore, the markup looks like
>>
>>          <tr:selectOneRadio value="#{AccountBean.selectedCreditCard}"
>> required="yes">
>>            <tr:iterator value="#{AccountBean.creditCards}" var="item">
>>              <trh:rowLayout>
>>                <trh:cellFormat>
>>                  <f:selectItem itemValue="#{item.id}"/>
>>                </trh:cellFormat>
>>               </trh:rowLayout>
>>               ..........
>>            </tr:iterator>
>>          </tr:selectOneRadio>
>>
>> The problem is the radio buttons does not show up. In other words,
>> tr:iterator does not work inside tr:selectOneRadio. Please help.
>>
>> thanks
>>
>> Bill
>>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>

Re: [trinidad] tr:iterator

Posted by Matt Cooper <ma...@gmail.com>.
Hi Bill,

I could be wrong but I don't believe the tr:selectOneRadio accepts
children that produce DOM.  Also, the trh:rowLayout must be inside of
a trh:tableLayout.

Instead of using tr:selectOneRadio, you may want to use multiple
tr:selectBooleanRadio components.  The selectBooleanRadio is more
flexible in that it allows you to place it scattered across your page
layout, e.g. into a tableLayout structure.

http://myfaces.apache.org/trinidad/trinidad-1_2/trinidad-api/tagdoc/tr_selectBooleanRadio.html

Regards,
Matt

On Mon, Jun 16, 2008 at 12:10 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> Hello,
>
> try tr:forEach. But I doubt that the trh tags will work
>
> -Matthias
>
> On Mon, Jun 16, 2008 at 8:48 AM, Zigc Junk <zi...@gmail.com> wrote:
>> Hi,
>>
>> I have a tr:tableLayout. Since the number of rows changes, I use
>> tr:iterator to enclose tr:rowLayout. One of the columns contains radio
>> buttons. Therefore, the markup looks like
>>
>>          <tr:selectOneRadio value="#{AccountBean.selectedCreditCard}"
>> required="yes">
>>            <tr:iterator value="#{AccountBean.creditCards}" var="item">
>>              <trh:rowLayout>
>>                <trh:cellFormat>
>>                  <f:selectItem itemValue="#{item.id}"/>
>>                </trh:cellFormat>
>>               </trh:rowLayout>
>>               ..........
>>            </tr:iterator>
>>          </tr:selectOneRadio>
>>
>> The problem is the radio buttons does not show up. In other words,
>> tr:iterator does not work inside tr:selectOneRadio. Please help.
>>
>> thanks
>>
>> Bill
>>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>

Re: [trinidad] tr:iterator

Posted by Matthias Wessendorf <ma...@apache.org>.
Hello,

try tr:forEach. But I doubt that the trh tags will work

-Matthias

On Mon, Jun 16, 2008 at 8:48 AM, Zigc Junk <zi...@gmail.com> wrote:
> Hi,
>
> I have a tr:tableLayout. Since the number of rows changes, I use
> tr:iterator to enclose tr:rowLayout. One of the columns contains radio
> buttons. Therefore, the markup looks like
>
>          <tr:selectOneRadio value="#{AccountBean.selectedCreditCard}"
> required="yes">
>            <tr:iterator value="#{AccountBean.creditCards}" var="item">
>              <trh:rowLayout>
>                <trh:cellFormat>
>                  <f:selectItem itemValue="#{item.id}"/>
>                </trh:cellFormat>
>               </trh:rowLayout>
>               ..........
>            </tr:iterator>
>          </tr:selectOneRadio>
>
> The problem is the radio buttons does not show up. In other words,
> tr:iterator does not work inside tr:selectOneRadio. Please help.
>
> thanks
>
> Bill
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org