incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naresh Bhatia" <NBha...@sapient.com>
Subject Generating links with request parameters in a <tr:forEach> loop
Date Fri, 24 Nov 2006 16:01:55 GMT
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:

<h:form>
    <div>
        <tr:forEach var="forum" items="#{forumListBean.forums}">
            <h:outputLink
value="#{facesContext.externalContext.requestContextPath}/ShowForum.jsf"
>
                <f:param name="forumId" value="#{forum.id}" />
                <h:outputText value="#{forum.title}" />
            </h:outputLink>
        </tr:forEach>
    </div>
</h:form>

This simply produces:

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

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

Naresh

Mime
View raw message