You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sundar Narasimhan <su...@ascent.com> on 2003/05/04 15:14:19 UTC

is there a logic:contains

I'd like to include some HTML if there's a collection with a certain
value in my model/form/whatever.

Currently I seem to have to do
	  <logic:equal name="foo" property="isXThere" value="true">
	   ...
and have a getisXThere() method that does the checking.

What I'd like to be able to do is..
          <logic:contains name="foo" property="someCollection"
          value="X">

Am I missing something obvious here? 


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


Re: is there a logic:contains

Posted by Phil Steitz <ph...@steitz.com>.
Sundar Narasimhan wrote:
> I'd like to include some HTML if there's a collection with a certain
> value in my model/form/whatever.
> 
> Currently I seem to have to do
> 	  <logic:equal name="foo" property="isXThere" value="true">
> 	   ...
> and have a getisXThere() method that does the checking.
> 
> What I'd like to be able to do is..
>           <logic:contains name="foo" property="someCollection"
>           value="X">
> 
> Am I missing something obvious here? 
> 

No.  The struts logic tag does not support this directly. All that is 
supported is isPresent, which in this case would refer to the whole 
collection.

> 
> ---------------------------------------------------------------------
> 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