Hi Bill, I just thought of another thing to try. In JSF, they have a tag, f:selectItems, which will let you get items from a list or array. If this works, this may be the simplest solution since it wouldn't need an iterator or forEach.
http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/f/selectItems.html Regards, Matt On Tue, Jun 3, 2008 at 3:41 PM, Zigc Junk <[EMAIL PROTECTED]> wrote: > Thanks for the help. I have tried almost everthing and none of them > works (tr:forEach, c:forEach, ui:repeat). One strange thing is > tr:forEach throws an exception saying something like unknown tag. I am > wondering if trinicad dropped tr:forEach? But, it is still in the > document. > > thanks > > Bill > > > > On Tue, Jun 3, 2008 at 4:32 PM, Matt Cooper <[EMAIL PROTECTED]> wrote: >> For this to work, the tr:selectOneChoice renderer would need to be >> enhanced to support processing of flattened children. The iterator >> actually shows up as a child component during rendering and the >> selectOneChoice component doesn't know what to do with an iterator >> child. >> >> An alternative to using iterator would be to use something like >> forEach since the forEach is resolved at tag execution time which >> means that no component corresponding to the forEach will show up as a >> child of the selectOneChoice component; instead each stamped-out >> selectItem will show up as children of the selectOneChoice. >> >> Regards, >> Matt >> >> On Tue, Jun 3, 2008 at 3:26 PM, Zigc Junk <[EMAIL PROTECTED]> wrote: >>> Sorry, I forgot to include the whole thing. Here it is. >>> >>> <tr:selectOneChoice value="#{DocsBean.docType}"> >>> <tr:iterator var="item" value="#{DocsBean.docTypes}"> >>> <tr:selectItem text="#{item.docType}" >>> value="#{item.docType}"/> >>> </tr:iterator> >>> </tr:selectOneChoice> >>> >>> thanks >>> >>> Bill >>> >>> On Tue, Jun 3, 2008 at 3:55 PM, Andrew Robinson >>> <[EMAIL PROTECTED]> wrote: >>>> How are you putting the tr:iterator in the page? I am pretty sure no >>>> components support iterators as children that expect selectItem >>>> children. >>>> >>>> On Tue, Jun 3, 2008 at 12:00 PM, Zigc Junk <[EMAIL PROTECTED]> wrote: >>>>> I am trying to create dropdown list with the following code but the >>>>> dropdown list shows up empty. Is there anything wrong in my code? The >>>>> value is a java.util.List and I am sure it is not empty. >>>>> >>>>> <tr:iterator var="item" value="#{DocsBean.docTypes}"> >>>>> <tr:selectItem text="#{item.docType}" >>>>> value="#{item.docType}"/> >>>>> </tr:iterator> >>>>> >>>>> >>>>> thanks >>>>> >>>>> Bill >>>>> >>>> >>> >> >

