You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Au-Yeung, Stella H" <st...@eds.com> on 2004/02/23 18:30:58 UTC

RE: tag doesn't recognize Struts dataBean property's value

As you suggested I will display the shopOrderExist property on the form too.
I know my loop is working fine because each of the ecord is displayed
correctly.   The only problem is when the flag is "notExist", it will
display the Update Link instead of the "Create Link.  That's why I thought
my <logic:equal> is not correct.

-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@blueyonder.co.uk] 
Sent: Monday, February 23, 2004 11:16 AM
To: Struts Users Mailing List
Subject: Re: <html:logic> tag doesn't recognize Struts dataBean property's
value


I doubt the problem is <logic:equal>.

Your jsp looks OK - why not try outputting the "shopOrderExist" property in
your table (along with yhe other stuff) - something along the lines of:

<td class="listCell"><bean:write name="sequenceList"
property="shopOrderExist"/></td>

That way, you can see the value the <logic:equal/notEqual> is testing
against.

Niall

----- Original Message ----- 
From: "Au-Yeung, Stella H" <st...@eds.com>
To: <st...@jakarta.apache.org>
Sent: Monday, February 23, 2004 3:34 PM
Subject: <html:logic> tag doesn't recognize Struts dataBean property's value


> Hi:
> In my struts-based application I am using a <html:logic> tag in my JSP
page
> to print two links depends on the value of a struts-based databean's 
> property. Bacially on this JSP page, a list of records wil be 
> displayed. Next to each record, either a "Create" link or an "Update" 
> link should be displayed depends upon the property '"shopOrderExist". 
> If this property
has
> the value "notExist", it should display the "Create" link. If it is 
> not equal to "notExist", it should display the "Update" link. For some 
> reason, the "Update" link is always displayed even though 
> "shopOrderExist" has a value of "notExist". So the logic:equal tag is 
> not comparing things correctly. Am I doing it wrong? (note, the 
> property "shopOrderExist" is of type String and in Debug I see that 
> its value is "notExist")
>
> Here's my code:
> <logic:iterate id="sequenceList" 
> collection="<%=ShopWorkOrderSearchFormBean.getPage()%>"
> type="com.cat.fdd.dataBean.shopWorkOrder.ShopWorkOrderSearchBean">
> <tr>
> <td class="listCell"><bean:write name="sequenceList" 
> property="sequence"/> </td>
>
> <!-- If the ShopOrderExist attribue is not equal to "notExist", 
> display Create link ,otherwise Update link--> <logic:equal 
> name="sequenceList" property="shopOrderExist"
value="notExist">
> <a href="app/fdd/shopWorkOrder/CreateShopWorkOrderRequest.exec">
> <img src="images/icoAdd.gif" border="0"></a>
> </logic:equal>
> <logic:notEqual name="sequenceList" property="shopOrderExist" 
> value="notExist"> <a 
> href="app/fdd/shopWorkOrder/UpdateShopWorkOrderRequest.exec">
> <img src="images/icoEdit.gif" border="0"></a> </logic:notEqual>
> </td>
> </tr>
>
> Thanks in advance!
> Stella
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org