[Struts] <set-property> how does it works?

S

ShadowMan

Hi all
I know that in <action> mapping I can use a sub-tag <set-property
property="" value="">
How can I access to these information inside an action?!
As I can imagine there should be a getProperty/getProperties method to the
ActionMapping class ....but it isn't!!
I appreciate any hint..

thanx
 
R

Ryan Stewart

ShadowMan said:
Hi all
I know that in <action> mapping I can use a sub-tag <set-property
property="" value="">
How can I access to these information inside an action?!
As I can imagine there should be a getProperty/getProperties method to the
ActionMapping class ....but it isn't!!
I appreciate any hint..

thanx
Read the DTD:
"The "set-property" element specifies the method name and initial value of
an additional JavaBean configuration property. When the object representing
the surrounding element is instantiated, the accessor for the indicated
property is called and passed the indicated value. The "set-property"
element is especially useful when a custom subclass is used with
<data-source>, <forward>, <action>, or <plug-in> elements. The subclass can
be passed whatever other properties may be required to configure the object
without changing how the struts-config is parsed."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,166
Latest member
DollyBff32
Top