jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Use logic:notEqual with form bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Use logic:notEqual with form bean" Watch "Use logic:notEqual with form bean" New topic

Use logic:notEqual with form bean

alan wamser
Ranch Hand

Joined: Jan 30, 2006
Posts: 41
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

Joined: Jan 12, 2006
Posts: 11
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:notEqual name="ManageTemplateForm" property="page" value="FirstPage">
<logic-l:equal name="ManageTemplateForm" property="page" value="First">
<bean:message key="managetemplateForm.property.previousPage"/>
<logic-l:notEqual name="ManageTemplateForm" property="page" value="First">
<html:link href="javascript:linkSelectedPrevious()">
<bean:message key="managetemplateForm.property.previousPage"/>
I agree. Here's the link: http://aspose.com/file-tools
subject: Use logic:notEqual with form bean
It's not a secret anymore!