Problem about Struts Tags

S

sidney

In Struts bean tab library, for the define tag, what is use of name
attribute and property attribute?

For example,
<bean:define id="layoutId" name="layout" property="layoutId"/>

Thanks a lot.

Btw, is there any web resource for struts reference? I find the one
provided by apache is difficult to read.
 
S

Steve Bosman

sidney said:
In Struts bean tab library, for the define tag, what is use of name
attribute and property attribute?

For example,
<bean:define id="layoutId" name="layout" property="layoutId"/>

"name" refers to the "name" used to store your bean in scope (e.g.
pagecontext.setAttribute(name,value)), since you are not using the
scope attribute this could be any of page, request, session and
application scope(s) searched in that order. "property" is used to find
the correct accessor for your bean so in your example you are stating
that you have put a bean with getLayoutId() accessor in scope using the
name layout.
Thanks a lot.

Btw, is there any web resource for struts reference? I find the one
provided by apache is difficult to read.

Can't think of a good web resource to be honest - since to be honest
I'm happy with the apache documentation - but you ought to join the
struts mailing list (email: (e-mail address removed)) and
google.

Steve
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top