Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
2.0.6
-
None
-
Important
Description
Hello,
I want to set a default value of the select box but it doesn't allows me to set the default value if i pass value higher than 1000.
For batter understanding of this issue I have given example below so that you can understand it.
EXAMPLE 1
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Select Tag Example</title>
</head>
<body>
<h1><span style="background-color: #FFFFcc">Select Tag Example!</span></h>
<s:form action="changeHeader">
<s:select label="Select Month" name="month"
list="#
" value="9"/>
<s:submit value="default value"/>
</s:form>
</body>
</html>
For the above given example I have passed 9 as the value of the VALUE ATTRIBUTE, and hence it shows me 9 as the default value.
EXAMPLE 2
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Select Tag Example</title>
</head>
<body>
<h1><span style="background-color: #FFFFcc">Select Tag Example!</span></h>
<s:form action="changeHeader">
<s:select label="Select Month" name="month"
list="#
" value="1034"/>
<s:submit value="default value"/>
</s:form>
</body>
</html>
in the above given example i have passed 1034 as the value of the VALUE ATTRIBUTE but this time it doesn't show me December as my default value for the list box because the value I have passed is higher than 1000 and hence it gives me error.
Please provide me solution of this as because my project is in trouble because of this issue and moreover, I am not allowed to upgrade my struts version.
However, as per my testing this is the problem with struts 2.0.6 and not with 2.0.14.
Hope to receive answer as the earliest.
Kind regards,
Ashish