struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Render preselected value in <s:select ../>
Date Fri, 28 Dec 2007 19:28:31 GMT
Hi all,

This struts code

<s:select lable="Months" name="months" headerKey="-1" headerValue="Select
Month" list="#{'01':'Jan','02':'Feb'}" value="selectedMonth"/>

generates this html code:

<select name="months" id="edit_months">
    <option value="-1">Select Month</option>
    <option value="01">Jan</option>
    <option value="02">Feb</option>

If I want "Feb" is selected (<option value="02" selected>Feb</option>), how
to do it in the <s:select .../>?

Many thanks.

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