The generated html content of <s:select/> is: <select name="adminGroupMapData.adminRid" id="AdminGroupMap_create_adminGroupMapData_adminRid"> <option value="" >------</option> <option value="741501">741501</option> <option value="741406">741406</option> <option value="741405">741405</option> <option value="741404">741404</option> <option value="741403">741403</option> <option value="741402">741402</option> <option value="741200">741200</option> <option value="741156">741156</option> <option value="741155">741155</option> <option value="741154">741154</option> <option value="741153">741153</option> <option value="741152">741152</option> <option value="741151">741151</option> <option value="1050">1050</option> <option value="50">50</option> </select>
There is no comma in the numeric value. On 7/26/07, Laurie Harper <[EMAIL PROTECTED]> wrote:
My bet is that it's a bug. If the limit is at 1000, I'm guessing the problem is that the value is being rendered as 1,000 (i.e. with a comma separator), and that's what causes the problem. You can verify this by viewing the HTML source of the rendered page. If that is indeed the case, a JIRA issue would be a good idea :-) L. Vincent Lin wrote: > But I already specified name="adminGroupMapData.adminRid" in the tag. > Shouldn't the preselected option be the value of > "adminGroupMapData.adminRid > "? > If the preselected option won't be the value of the attribute 'name', why > does it work when the value is less than 1000? > > On 7/26/07, yitzle <[EMAIL PROTECTED]> wrote: >> >> On 7/25/07, Vincent Lin <[EMAIL PROTECTED]> wrote: >> > I found some people are discussing this problem. >> > When the data type of the attribute is Integer, the value can't be too >> > large. >> > We can use toString() to make pre-selecting work. >> > So I changed my <s:select/> tag to: >> > >> > <s:select name="adminGroupMapData.adminRid" >> > headerKey="" headerValue="------" >> > list="adminList" listKey="adminRid" >> > listValue="adminRid" >> > value="%{adminGroupMapData.adminRid.toString ()}" >> /> >> > >> > And it works now. >> > Is this a bug of struts 2.0.6??? >> > >> > On 7/25/07, Vincent Lin <[EMAIL PROTECTED]> wrote: >> >> The 'value' property/parameter: >> > value="%{adminGroupMapData.adminRid.toString ()}" >> /> >> is what sets what is selected, or what gets 'jumped' to. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]