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

Use logic:notEqual with form bean

 
alan wamser
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • 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>.
 
Amit Kumar Kaushik
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic