incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naresh Bhatia" <>
Subject RE: Generating links with request parameters in a <tr:forEach> loop
Date Fri, 24 Nov 2006 17:49:01 GMT
Ok, I figured out that <f:param> and <h:outputText> cannot use the var
attribute of <tr:forEach>. Replacing <h:outputText> with <tr:outputText>
fixed that problem, but I don't know how to fix <f:param> problem -
there does not seem to be an equivalent <tr:??> tag.


P.S. Earlier I was using a <tr:commandLink> with a <tr:setActionListener
to get a similar functionality. However it was causing an extra read
from my database which I am trying to eliminate. Here's the earlier
implementation (forumListBean and forumDetailsBean are in request scope
- I do not want them in session scope - which admitedly will make the
implementation a lot simpler, but again I Want my session to be as light
as possible):

        <tr:forEach var="forum" items="#{forumListBean.forums}">
            <tr:commandLink immediate="true" text="#{forum.title}"

-----Original Message-----
From: Naresh Bhatia [] 
Sent: Friday, November 24, 2006 11:02 AM
Subject: Generating links with request parameters in a <tr:forEach> loop

I am trying to generate links with request parameters in a <tr:forEach>
loop. Here's the desired output:

<a href="/forums/ShowForum.jsf?forumId=1">Forum 1</a> <br/>
<a href="/forums/ShowForum.jsf?forumId=2">Forum 2</a> <br/>
<a href="/forums/ShowForum.jsf?forumId=3">Forum 3</a> <br/>

What is the easiest way to do this? I have tried the following:

        <tr:forEach var="forum" items="#{forumListBean.forums}">
                <f:param name="forumId" value="#{}" />
                <h:outputText value="#{forum.title}" />

This simply produces:

<a href="/forums/ShowForum.jsf?forumId="></a>

Obviously, the forum id and forum title are not substituted.


View raw message