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

-----Original Message-----
From: Marcus [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 9:47 AM
To: Struts Users Mailing List
Subject: Re: message resources

>
> When using EL with dyna beans you need to reference the map property 
> then your property. The struts tags (i.e. bean:write) handle this for 
> you.
>
>  <bean:message key="valueAdded"

Sorry,

call me dumb,
but I didn't really get what you tried to explain.

EL ?
- map property  - you mean my dynaForm?
Or do you really mean a map? I am not using one..

Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-----------------------------------------
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to