commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wynter" <da...@roamware.co.uk>
Subject [Jelly] Accessing a HashMap in JellyContext variables from script
Date Thu, 25 Mar 2004 15:32:03 GMT
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


Mime
View raw message