Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic:equal comparison against int data type

 
pendse anagha
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I am trying to compare a bean value against a constant .
This constant datatype is of primitive "int"

I am iterating over a bean array that has been set to the form bean
Here is the code :




Code for the JSP :


The error that I am getting is :
No match was found for method "setValue(int)".

How can I compare an integer value in logic:equal

Thanks in advance,
-anagha
[ March 23, 2005: Message edited by: pendse anagha ]
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
logic:equal expects the value attribute to be of the type string .hence use String.valueOf() to compare them
 
Franck Tranchant
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

String.valueOf(myConstants.ID) should work.

 
pendse anagha
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Frank and Sreenath
That helps

Regards,
-anagha
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic