You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Gössel, Stefan" <st...@entory.com> on 2001/02/14 12:30:54 UTC

If property !=null tag?

Hi,

i want a part of my JSP code to be ignored, if a property in my Actionbean
is null. 
Any idea for this in struts without too much JSP code ?

Thanks in advance,

Stefan


Re: If property !=null tag?

Posted by Chris Evans <ch...@canlink.com>.
If property !=null tag?Hi,
I used the <ifPropertyNotEquals> tag like this:

<struts:ifPropertyNotEquals name="ViewOrderForm"
                            property="orderLI"
                            value="" >

It seems to work fine.  The property orderLI is an array which if there is no value in it returns null to the JSP.  I don't think this tag is documented for some reason.  I'm using struts version 0.5.  If there is a better way I'd like to hear about it!

Chris Evans
Canlink Interactive Technologies

  ----- Original Message ----- 
  From: Gössel, Stefan 
  To: 'struts-user@jakarta.apache.org' 
  Sent: Wednesday, February 14, 2001 6:30 AM
  Subject: If property !=null tag?


  Hi, 

  i want a part of my JSP code to be ignored, if a property in my Actionbean is null. 
  Any idea for this in struts without too much JSP code ? 

  Thanks in advance, 

  Stefan 


RE: If property !=null tag?

Posted by Brian Bowman <br...@nordicwave.com>.
If you are using Struts 1.0, have you tried?

<logic:present name="yourForm" property="yourProp" >
            Shown only when yourProp is not null
</logic:present>

-----Original Message-----
From: Gössel, Stefan [mailto:stefan.goessel@entory.com]
Sent: Wednesday, February 14, 2001 12:31 PM
To: 'struts-user@jakarta.apache.org'
Subject: If property !=null tag?

Hi,
i want a part of my JSP code to be ignored, if a property in my Actionbean
is null.
Any idea for this in struts without too much JSP code ?
Thanks in advance,
Stefan