You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wes Wannemacher (JIRA)" <ji...@apache.org> on 2009/05/29 17:12:42 UTC

[jira] Closed: (WW-3080)
     [ https://issues.apache.org/struts/browse/WW-3080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes Wannemacher closed WW-3080.
-------------------------------

       Resolution: Incomplete
    Fix Version/s: 2.0.14

hmm... Okay, there are a couple of things wrong here, first off, you say that you don't experience the problem with 2.0.14? If that's the case, then use 2.0.14... Second, your keys are all strings, but when you try to set value, you set it to a number. I'm guessing you need to read up a bit on OGNL. Please post questions like this to the users@struts.apache.org mailing list before filing it as a bug. Also, if you are using an old release of struts and find that a newer release solves the problem, then use the newer release. We do not change releases that have already been released. 

> <s:select tag has bag and doesnt allow to set me default value if the value is higer than 1000
> ----------------------------------------------------------------------------------------------
>
>                 Key: WW-3080
>                 URL: https://issues.apache.org/struts/browse/WW-3080
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions, Plugin - Tags
>    Affects Versions: 2.0.6
>            Reporter: ashish taank
>             Fix For: 2.0.14
>
>
> 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="#{'1021':'January',
>     					'1022':'February',
>     					'1023':'March',
>     					'1024':'April',
> 						'1025':'May',
> 						'1026':'June',
> 						'1027':'July',
> 						'1028':'August',
> 						'1029':'September',
> 						'1031':'October',
> 						'1032':'November',
> 						'9':'December'}" 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="#{'1021':'January',
>     					'1022':'February',
>     					'1023':'March',
>     					'1024':'April',
> 						'1025':'May',
> 						'1026':'June',
> 						'1027':'July',
> 						'1028':'August',
> 						'1029':'September',
> 						'1031':'October',
> 						'1032':'November',
> 						'1034':'December'}" 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.