[jira] [Updated] (WW-3876) NumberConverter convert WRONG

2012-09-11 Thread Rene Gielen (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-3876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rene Gielen updated WW-3876:


Priority: Minor  (was: Major)

> NumberConverter convert WRONG
> -
>
> Key: WW-3876
> URL: https://issues.apache.org/jira/browse/WW-3876
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions, Value Stack
>Affects Versions: 2.3.4.1
> Environment: java version "1.6.0_31"
> Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
> Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
> OS:Win7   
> Browser:Chrome  
> OGNL version 3.0.5
>Reporter: Steven Sinclair
>Priority: Minor
>  Labels: mapping
>
> I have one action let's called Foo.
> Foo has one field named "entity" and Foo implement ModelDriven interface.
> so code like below:
> {code:title=Foo.java|borderStyle=dashed}
> @Namespace("/userresourceaccount")
> public class Foo ... {
> 
> private UserResourceAccount entity = new UserResourceAccount();
> 
> @Override
> public UserResourceAccount getModel() {
> return entity;
> }
> @Action(value = "deleteResourceAccountByUserId", results = {@Result(name 
> = "swJson", type = "json", params = {
> "root", "result"})})
> public String deleteResourceAccountByUserId()
> throws Exception {
> 
> try {
> String id = RequestUtils.getStringParameter(getRequest(), "id");
> 
> String[] ids = id.split(",");
> userResourceAccountService.deleteUserResourceAccount(ids);
> 
> result.add(true);
> }
> catch (Exception e) {
> logger.error(e.getMessage(), e);
> result.add(false);
> }
> 
> return "swJson";
> }
> ...
> {code}
> http request like this
> {color:green}/userresourceaccount/deleteResourceAccountByUserId.action?id=3571,{color}
> actually,above "id" is not numerical.it is String value.
> but "entity" has one Long field  named "id":
> {code:title=UserResourceAccount.java|borderStyle=dashed}
>  public class UserResourceAccount {
> private Long id;
>...
>   }
> {code}
> and error happened.
> {quote}
> 2012-09-10 18:24:53,258 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Checking ConfigurationProviders for reload.
> 2012-09-10 18:24:53,261 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@1071776], 
> property=struts]
> 2012-09-10 18:24:53,262 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Checking ConfigurationProviders for reload.
> 2012-09-10 18:24:53,264 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@1071776], 
> property=struts]
> 2012-09-10 18:24:53,265 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Checking ConfigurationProviders for reload.
> 2012-09-10 18:24:53,266 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Creating an DefaultActionProxy for namespace /userresourceaccount and 
> action name deleteResourceAccountByUserId
> 2012-09-10 18:24:53,268 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - entering MessageStoreInterceptor ...
> 2012-09-10 18:24:53,269 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - retrieve error / message from session to populate into action 
> [net.bwda.framework.web.asset.UserResourceAccountAction@134b16b]
> 2012-09-10 18:24:53,269 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - intercept '/userresourceaccount/deleteResourceAccountByUserId' { 
> 2012-09-10 18:24:53,269 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - applied invocation context locale=zh_CN
> 2012-09-10 18:24:53,270 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - before Locale=zh_CN
> 2012-09-10 18:24:53,270 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68

[jira] [Updated] (WW-3876) NumberConverter convert WRONG

2012-09-10 Thread Steven Sinclair (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-3876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steven Sinclair updated WW-3876:


Environment: 
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

OS:Win7   
Browser:Chrome  

OGNL version 3.0.5



  was:
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

Win7   Chrome  

OGNL version 3.0.5




> NumberConverter convert WRONG
> -
>
> Key: WW-3876
> URL: https://issues.apache.org/jira/browse/WW-3876
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions, Value Stack
>Affects Versions: 2.3.4.1
> Environment: java version "1.6.0_31"
> Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
> Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
> OS:Win7   
> Browser:Chrome  
> OGNL version 3.0.5
>Reporter: Steven Sinclair
>  Labels: mapping
>
> I have one action let's called Foo.
> Foo has one field named "entity" and Foo implement ModelDriven interface.
> so code like below:
> {code:title=Foo.action|borderStyle=dashed}
> @Namespace("/userresourceaccount")
> public class Foo ... {
> 
> private UserResourceAccount entity = new UserResourceAccount();
> 
> @Override
> public UserResourceAccount getModel() {
> return entity;
> }
> @Action(value = "deleteResourceAccountByUserId", results = {@Result(name 
> = "swJson", type = "json", params = {
> "root", "result"})})
> public String deleteResourceAccountByUserId()
> throws Exception {
> 
> try {
> {color:red}
> String id = RequestUtils.getStringParameter(getRequest(), "id");
> 
> String[] ids = id.split(",");
>
> {color} 
> userResourceAccountService.deleteUserResourceAccount(ids);
> 
> result.add(true);
> }
> catch (Exception e) {
> logger.error(e.getMessage(), e);
> result.add(false);
> }
> 
> return "swJson";
> }
> ...
> {code}
> http request like this
> {color:green}/userresourceaccount/deleteResourceAccountByUserId.action?id=3571,{color}
> actually,above "id" is not numerical.it is String value.
> but "entity" has one Long field  named "id":
> {code:title=UserResourceAccount.java|borderStyle=dashed}
>  public class UserResourceAccount {
> private Long id;
>...
>   }
> {code}
> and error happened.
> {quote}
> 2012-09-10 18:24:53,258 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Checking ConfigurationProviders for reload.
> 2012-09-10 18:24:53,261 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@1071776], 
> property=struts]
> 2012-09-10 18:24:53,262 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Checking ConfigurationProviders for reload.
> 2012-09-10 18:24:53,264 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@1071776], 
> property=struts]
> 2012-09-10 18:24:53,265 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Checking ConfigurationProviders for reload.
> 2012-09-10 18:24:53,266 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - Creating an DefaultActionProxy for namespace /userresourceaccount and 
> action name deleteResourceAccountByUserId
> 2012-09-10 18:24:53,268 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - entering MessageStoreInterceptor ...
> 2012-09-10 18:24:53,269 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - retrieve error / message from session to populate into action 
> [net.bwda.framework.web.asset.UserResourceAccountAction@134b16b]
> 2012-09-10 18:24:53,269 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:68)]
>  - intercept '/userresourceaccount/deleteResourceAccountByUserId' { 
> 2012-09-10 18:24:53,269 [5119480@qtp-29553921-9] DEBUG 
> [com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(Comm