struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Eckart" <marc.eck...@googlemail.com>
Subject <s:if> Question
Date Thu, 20 Sep 2007 15:41:56 GMT
Hi,

I'm building a pagination functionality for a list. I'm rendering the page
list and want to highlight the current page.
What condition should be in the test attribute?

    <s:iterator value="resultsPageNumberList" id="pageId">
        <s:if test=" . . . . .">
            <s:url id="paginationLink" value="/paginateResultList.action" >
                <s:param name="page"><s:property /></s:param>
            </s:url>
            <s:a theme="ajax" targets="displaySearchResults"
href="%{paginationLink}"><s:property /></s:a>
        </s:if>
        <s:else>
            <b><s:property /></b>
        </s:else>
    </s:iterator>

I can put the current pageIndex as an getter in the action. But I don't know
how to put this in the condition.

Any ideas? Or any other suggestions?

Thanks in advance :-)

Best Regards,
Marc

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message