You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Avinash Gangadharan <ag...@ucdavis.edu> on 2004/02/18 21:43:21 UTC

Conditional tag for method results

Hello All,
    I'm fairly new to the world of struts so pardon me if this has already
been asked. 

Could someone tell me if I can replace the following with a much better
looking tag library usage:

<% if( foo.method( "xyz" ) ) { %> 
  <html:submit value="Submit">
      Submit
  </html:submit>
% } %>

You can assume that foo exists in the scope of the page.

Thanks and Regards
Avinash

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


Re: Conditional tag for method results

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Yo can either use the Struts "logic" tags, or the standard tag library
(JSTL)

JSTL:  http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
Struts Logic Tags:
http://jakarta.apache.org/struts/userGuide/struts-logic.html

Niall
----- Original Message ----- 
From: "Avinash Gangadharan" <ag...@ucdavis.edu>
To: <st...@jakarta.apache.org>
Sent: Wednesday, February 18, 2004 8:43 PM
Subject: Conditional tag for method results


> Hello All,
>     I'm fairly new to the world of struts so pardon me if this has already
> been asked.
>
> Could someone tell me if I can replace the following with a much better
> looking tag library usage:
>
> <% if( foo.method( "xyz" ) ) { %>
>   <html:submit value="Submit">
>       Submit
>   </html:submit>
> % } %>
>
> You can assume that foo exists in the scope of the page.
>
> Thanks and Regards
> Avinash
>
> ---------------------------------------------------------------------
> 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