Hi,
 
I have made a simple struts form 

<s:form action="addProduct" method="post" validate="true" >
Name nl<s:textfield name="nameNl" />
price<s:textfield name="price" value=""/>
</s:form> 

And an action class with getters and setters for nameNl and price.
When I submit my form, with a price > 0, for example 3, everything goes
well.
When I enter 0 or a negative number, I get the following error:

java.lang.NoSuchMethodException: setPrice([Ljava.lang.String;)]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:823)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:964)
at
ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.j
ava:75)
at
ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:131)
at
com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectA
ccessor.java:28)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
...

I know this has been posted a few times, but I can't find an answer
anywhere..
Is this a bug? And how can I resolve it?
I found something at: 
https://issues.apache.org/struts/browse/WW-2971?page=com.atlassian.jira.
plugin.system.issuetabpanels%3Aall-tabpanel
<https://issues.apache.org/struts/browse/WW-2971?page=com.atlassian.jira
.plugin.system.issuetabpanels%3Aall-tabpanelbut> 
but I have no idea what I should do with that article, or with the zip
in attchement on that article.
Can anyone help me pls?

 

Thx,
Sandy

 

Reply via email to