> > JSTL supports dynabeans transparently
> 
> Could you please supply a scenario and sample code that proves this?

well.. I thought dynabeans were supported cause I'm using them without problem, since 
in 
the JSTL ML told me the full support will be added in the 2.x release I can at least 
say the 
OUT and various FMT tags work fine with them  

<%@ page language="java" import="org.apache.commons.beanutils.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>

<%
      DynaProperty[] props = new DynaProperty[2];
      BasicDynaClass dClass = null;

      props[0] = new DynaProperty("ciccio");
      props[1] = new DynaProperty("pippo");


      try {dClass = new BasicDynaClass("flare", 
Class.forName("org.apache.commons.beanutils.BasicDynaBean"), props);
      } catch (Exception e) {  e.printStackTrace(); }

      DynaBean dbean = dClass.newInstance();
      dbean.set("ciccio","uno");
      dbean.set("pippo","due");
      pageContext.setAttribute("flare",dbean);
 %>

 <c:out value="${flare.ciccio}"/>
 <%=((DynaBean)pageContext.getAttribute("flare")).get("pippo")%>


  



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

Reply via email to