At end. > -----Original Message----- > From: Craig R. McClanahan [mailto:craigmcc@;apache.org] > Sent: Tuesday, October 29, 2002 11:44 PM > > > >>>>> "David" == David Karr <Karr> writes: > > David> Presently JSTL tags can't easily access > DynaActionForm objects. I haven't > > David> used these much, but I would assume they're > reasonably widely used. How > > David> important do you think it is for JSTL tags to be > able to access properties > > David> of these objects? > > > > As a proof of concept, I've verified that just by adding > the following to the > > DynaActionForm class: > > > > public Map getMap() { > > return (dynaValues); > > } > > > > along with the following pre-Action code: > > > > dynaActionForm.set("foo", "alpha"); > > dynaActionForm.set("bar", "beta"); > > > > The following JSP code: > > > > <c:out value="${dynabean.map.foo}"/>/<c:out > value="${dynabean.map.bar}"/> > > > > prints out "alpha/beta". > > Therefore, I'm +1 to adding a getMap() method to > ActionDynaForm in Struts, > to make it possible for DynaBeans to interoperate with *standard* JSTL > tags (and, by the same token, with the standard capabilities > of JSP 2.0 > containers). This won't be invisible, because the expression > will have to > be different, but at least it will be possible. > > However, I don't believe this change should be done in the underlying > commons-beanutils APIs, because if you are using commons-beanutils > already, you have transparent access (via BeanUtils and > PropertyUtils) out > of the box, and need nothing more. And there might well be > environments > where DynaBean is implemented using techniques other than an > internal Map > -- it is not fair to constrain those possible implementations > by requiring > them to implement a potentially costly getMap() method.
This is one of the few times I've wondered whether multiple class inheritance would be useful. Oh, well. Does anyone else want to chime in on this? If I commit this, I plan on also adding something to the paragraphs in the user guide, along with something in the Struts-EL top-level "package.html" description. With respect to the user guide information on DynaActionForm, I noticed that section 4.2.1 is titled "DynaActionForm Classes", and 4.2.2 is titled "Map-backed ActionForms". Adding this new "map" information will require a little clarification of those different "map" dimensions. -- To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
