• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Use logic:notEqual with form bean

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use an ActionFrom to get the values for a user to edit. One of the fields in the form is the currentManager. I'd like to use the logic:notEqual to hide part of the form when the current manager is equal to equest.getUserPrincipal().getName().

Based on the tld, name is a required attribute for the tag. But for the life of me I can't use the formBean with the <logic:notEqual>.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have done the same application once. see the code below and try your hand on it.

1 . ManageTemplateForm is the form object

2. page is a String property in form.

3. Value is the String i want to compare.

<logic-l:equal name="ManageTemplateForm" property="page" value="FirstPage">
<bean:message key="managetemplateForm.property.previousPage"/>
<bean:message key="managetemplateForm.property.nextPage"/>
</logic-l:equal>
<logic-l:notEqual name="ManageTemplateForm" property="page" value="FirstPage">
<logic-l:equal name="ManageTemplateForm" property="page" value="First">
<bean:message key="managetemplateForm.property.previousPage"/>
</logic-l:equal>
<logic-l:notEqual name="ManageTemplateForm" property="page" value="First">
<html:link href="javascript:linkSelectedPrevious()">
<bean:message key="managetemplateForm.property.previousPage"/>
</html:link>
</logic-l:notEqual>
 
reply
    Bookmark Topic Watch Topic
  • New Topic