commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wynter" <da...@roamware.co.uk>
Subject RE: [Jelly] Accessing a HashMap in JellyContext variables from script
Date Fri, 26 Mar 2004 19:57:54 GMT
Hi,

Is my question too hard or too stupid? I note from the Jexl code there is an
'is' method for Boolean that it look sfor, not sure how this would affect my
approach to testing a Boolean, should I add an isSuccess() method to my
bean?

Thanks

David

> -----Original Message-----
> From: David Wynter [mailto:david@roamware.co.uk]
> Sent: 25 March 2004 15:32
> To: Jakarta Commons Users List
> Subject: [Jelly] Accessing a HashMap in JellyContext variables from
> script
>
>
> If I add a HashMap with JavaBeans in it into the JellyContext like so:
>
> 			HashMap myBeanMap = new HashMap();
> 			MyBean aBean = new MyBean();
> 			aBean.setSuccess(new Boolean(true));
> 			myBeanMap.put("aBean", aBean);
> 			JellyContext myContext = this.getContext();
> 			myContext.setVariable("myBeanMap", myBeanMap);
>
> How would I then test that for that value in HashMap in a Jexl expression?
>
> something like this?
> <j:if test="${myBeanMap.get("aBean").success == true}">
> 	<pass/>
> </j:if>
>
> Thanks
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


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


Mime
View raw message