Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Communication Patterns: A Guide for Developers and Architects
this week in the
Design and Architecture
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Struts
conditional tags not working - struts2
Rohit Rai
Ranch Hand
Posts: 53
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I have set the following variables as shown below.
<s:set name="idValue" value="projectId" /> <s:set name="refIdValue" value="ref_mgeme_id" />
Now i am trying to compare it using the following:
<s:if test="%{#idValue==#refIdValue}"> //statement 1 </s:if> //statement 2<s:else> </s:else>
but it always goes to the wrong part i.e. the else part .
Nishan Patel
Ranch Hand
Posts: 689
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
try simple this
<s:if test="#idValue==#refIdValue"> //statement 1 </s:if> <s:else> //statement 2 </s:else>
Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD
Java Developer
,
My Blog
David Newton
Author
Posts: 12617
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Are they the same type?
Rohit Rai
Ranch Hand
Posts: 53
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
Thank you very much for the above responses. Actually my fault. I was setting some wrong values in the action class itself.
I tend to be careless at times
Thanks a lot,
Rohit
Well THAT's new! Comfort me, reliable tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
S:elseif not working correctly
<s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>
Struts2: Disable textfield
fow to forward to an action from jsp ?
Struts2 test condition in s:if not working
More...