Samere, Adam J schrieb:
Internally the DynaForm (i.e. DynaBean) uses a Map to store the
properties. This is what allows it to provide dynamic properties and
save you from writing ActionForm subclasses.
When you reference myDynaForm with a JSP Expression Language (EL)
expression like ${myDynaForm.description} reflection is used to call a
getter method (in this case getDescription() on the instance
(myDynaForm).
So... ${myDynaForm.description} is equivalent to
myDynaForm.getDescription()
The DynaForm class does not have this method. It does however have a
method public Map getMap() which returns the Map used to store your
properties. So, by putting ${myDynaForm.map.description} the equivalent
is myDynaForm.getMap().get("description") which will return your
property.
When using the struts bean tags such as bean write the tags are aware of
the DynaBean, and therefore know that they need to get the underlying
Map, then call get(String) using the supplied property.
Make sense?
-Adam
Make sense? YES!
And it works, works, works... ;-)
Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]