> Has anyone experienced the <tiles:useAttribute /> tag returning null for > an attribute that is explicitly defined in the tiles-defs.xml file? Any > assistance provided would be much appreciated. > > Example (foo and bar are each defined with values in the tiles-defs.xml): > ================== > It appears that the first <tiles:useAttribute/> tag is able to read it's > attribute, but any subsequent <tiles:useAttribute/> tags are not. > > <tiles:useAttribute name="foo" classname="java.lang.String" /> > <tiles:useAttribute name="bar" classname="java.lang.String" /> > <%= foo %><!-- 1 --> > <%= bar %><!-- 2 --> > > 1. returns the value from the tiles-defs.xml file for foo > 2. returns null > > <tiles:useAttribute name="bar" classname="java.lang.String" /> > <tiles:useAttribute name="foo" classname="java.lang.String" /> > <%= foo %><!-- 1 --> > <%= bar %><!-- 2 --> > > 1. returns null > 2. returns the value from the tiles-defs.xml file for bar > > > However, if I explictly obtain the values from the ComponentContext: > -------------------------------------------------------------------------- > ----------------------- > > ComponentContext c = > (ComponentContext)pageContext.getAttribute(ComponentConstants.COMPONENT_CO > NTEXT, pageContext.REQUEST_SCOPE); > Iterator it = c.getAttributeNames(); > while (it.hasNext()) > { > String attributeName = (String) it.next(); > out.print(attributeName); > out.print((String)c.getAttribute(attributeName); > } > > both (all) attribute/value pairs are available. What gives? > > I'm running Struts 1.1-Beta 2 under Resin 2.1.6 with JDK 1.3.1. > > Regards, > -Chris Walk
-- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>