I'm asking this here first, to discuss the technical issues.  If it appears
to be feasible, I'll ask a similar question on the user list, and then
perhaps write a bug report.

Presently JSTL tags can't easily access DynaActionForm objects.  I haven't
used these much, but I would assume they're reasonably widely used.  How
important do you think it is for JSTL tags to be able to access properties
of these objects?

I believe there's a simple change we could make to DynaActionForm to allow
access to them from JSTL tags.  Since DynaActionForm doesn't present a
strict JavaBeans interface to its properties, you can't access them
normally.  However, the property values are stored in a HashMap in the
DynaActionForm.  The JSTL EL syntax can access hashmap entries.  So, if we
simply added a standard JavaBeans accessor for the HashMap, then the JSP
programmer could access these properties through a syntax like this:

  value='${actionForm.dyna["foo"]}'

for the "foo" property of the "actionForm" DynaBean.

Note that this now provides an additional access path to the DynaBean
properties.  I don't know if that creates a problem.

I have not completely analyzed the current code in DynaActionForm, wrt how
it currently retrieves and sets values, to see if there's anything
inconsistent with accessing the values as direct values from the HashMap.  I
have also not yet written a line of code to implement or test this.

The first question is can this be done?  Second, should it be done?  And
third, should it be done pre- or post-1.1?

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

Reply via email to