This problem loosely related to a couple of others that I've seen recently
on this list, and it's a common enough thing to do that there must be a
simple solution that I just don't see.

I want to produce a list of search results as hyperlinks in which each list
value is displayed AND is used in the link, as in:

        <ol>
                <li><a href="/myapp/fetchItem.do?key=key_1">key_1</a>
                <li><a href="/myapp/fetchItem.do?key=key_2">key_2</a>
                <li><a href="/myapp/fetchItem.do?key=key_3">key_3</a>
                ... etc ...
        </ol>

I've tried using the iterate tag and a bean that has an Iterator property,
along with <html:link> as in the following sample:

        <logic:iterate id="results" name="mainSearchBean"
                                property="resultsIterator" >
                <li>
                        <html:link page="/bookDetails.do"
                                paramId="key" paramName="?" paramProperty="?" >
                                <bean:write name="results"/>
                        </html:link>
        </logic:iterate>

I've tried setting paramId, paramName, and paramProperty in various ways but
nothing gives me the results I want.  The best I get is a list of hyperlinks
for the results as expected except that the actual links are all the same.
I also tried jamming a copy of the <bean:write name="results"> tag in the
page attribute of <html:link> but that caused an exception.  Should I just
add a Map property to mainSearchBean and, if so, how would I use it to this
effect?

Thanks.

- Mark.


Reply via email to