• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Using logic:equal

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having some problems with logic:equal tag.
In my action class, I set
request.setAttribute("ReportingForm",rf);
where rf is an object of ReportingForm.
In the jsp , I use the following :
<bean efine name="ReportingForm" id="rf"/>
<logic:equal name="rf" property="ascDecOrder" value="1" scope="request">
- then display image.
</logic:equal>
getter and setters are available for 'ascDecOrder' in ReportingForm.The problem is, the image is displayed even if the ascDecOrder is 3 or 4 or anyother value.
What am i doing wrong ? Any help is appreciated.
Thank you,
Suman
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the example you gave, the variable rf is actually in page scope, not request scope.

Try just eliminating the <bean:define> tag and coding:

<logic:equal name="ReportingForm" property="ascDecOrder" value="1" scope="request">
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic