Hello laredotornado,
laredotornado schrieb:
I have a single select menu on my search page. What is the struts way to
construct this menu such that when the user is redirected to this search
page, the menu is pre-selected with what they selected from the original
search?
Thanks, - Dave
<select size="1" name="searchCriteria">
<option value="exactMatch">Exactly
Matches</option>
<option
value="contains">Contains</option>
<option value="startsWith">Starts
With</option>
<option value="endsWith">Ends
With</option>
</select>
Normally, you would go for the ordinary <s:select>-Tag [1], but I am not
using it, because it is buggy[2]. You can also do it "by hand" like I do:
<c:set var="selected">selected="selected"</c:set>
<select id="type" name="type" class="type" size="1">
<option value="all" ${type == 'all' ? selected : ''}>(keine
Einschränkung)</option>
<option value="user" style="background-image:
url(${cp}/_global/user.png)" ${type == 'user' ? selected :
''}>Benutzer</option>
<option value="tag" style="background-image:
url(${cp}/_global/tag.png)" ${type == 'tag' ? selected : ''}>Tag</option>
<option value="object" style="background-image:
url(${cp}/_global/object.png)" ${type == 'object' ? selected :
''}>Objekt</option>
</select>
~Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]