The error/warning you are talking about happens when the conversion fails. 
Essentially, after it tries the conversion and can't do it then it tries to
apply the setXXX(String xxx), but that really is not what you want at all.  

When you are using your own converters you want to be able to return a NULL
for example when you get a "" and you are expecting an id to convert to some
kind of object.  




newton.dave wrote:
> 
> sandy.verfai...@roularta.be wrote:
>> I've changed my original setter to setStockAmountInt(int
>> stockAmount), and kept setStockAmount(String stockAmount) so it could
>> be used by the default ognl conversion. Now I can work without
>> errors, but it seems kind of strange to me that this is the normal
>> way of working, is it?
> 
> No; you shouldn't need to do that (and you're breaking JavaBean 
> convention by doing so). The default type conversion should be 
> converting the form values to int automatically.
> 
> If it's not, something is very wrong, because this functionality has 
> been working for a very long time.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/struts-2.1.5-type-conversion-error-tp24534638p25018347.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to