• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending variables problem

 
Andrei Antonescu
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am havin a textfield with the value 0.0. In my action i have a X variable of type Float. When the textfield is non-zero, the conversion is made correctly and the X variable is initialised in the action. When it is 0 it gives an exception because it is searching for a setter of type String (for the variable X I only have one of type Float).
I have tried to create a setX(String y) method but the result is the same.

Can you please help?
Thanks in advance
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This appears to be a known issue with Struts. Is it possible for you to use a different type for this variable?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic