File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes logic:equal comparison against int data type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:equal comparison against int data type" Watch "logic:equal comparison against int data type" New topic
Author

logic:equal comparison against int data type

pendse anagha
Ranch Hand

Joined: Mar 09, 2005
Posts: 44
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

Joined: Sep 21, 2003
Posts: 415
logic:equal expects the value attribute to be of the type string .hence use String.valueOf() to compare them
Franck Tranchant
Ranch Hand

Joined: Aug 07, 2003
Posts: 75
Hi

String.valueOf(myConstants.ID) should work.



Franck<p>--------------------
pendse anagha
Ranch Hand

Joined: Mar 09, 2005
Posts: 44
Thanks Frank and Sreenath
That helps

Regards,
-anagha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logic:equal comparison against int data type
 
Similar Threads
Multiple submit buttons with JavaBeans
Iterate Hashmap through struts
how to apply continue statement in struts logic:iterate tag
logic:iterate problem
logic:iterate hashmap with key of hashmap