Either provide a getter in your "foo" object [i.e. getMethod()] and then you
can do
   <logic:equals name="foo" property="method" value="xyz">
or if you can't change foo, do the method in your action and store the
results somewhere (form, request, session) and then test that

Niall
----- Original Message ----- 
From: "Gopalakrishnan, Jayesh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 9:33 PM
Subject: RE: Conditional tag for method results


> You will need to create a simple custom tag for this.
> Its pretty simple, & plenty of samples are available.
>
>
> -jayash
>
>
> -----Original Message-----
> From: Avinash Gangadharan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 18, 2004 1:20 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Conditional tag for method results
>
>
> I did look at those earlier, unfortunately I could not figure out how can
I
> pass in a method call with a paramater passed to it, as the expression for
> comparison.
> The tags allow bean properties, cookie , request parameter etc...
> Could you tell me how can I use a method call with a parameter that I pass
> from within the JSP for evaluating the result.
>
> Thx
> A
>
> -----Original Message-----
> From: Niall Pemberton
> To: Struts Users Mailing List
> Sent: 2/18/2004 1:07 PM
> Subject: Re: Conditional tag for method results
>
> 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" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to