Topic: struts的action里的attribute是什么作用????? |
Print this page |
1.struts的action里的attribute是什么作用????? | Copy to clipboard |
Posted by: uu_snow Posted on: 2003-05-23 16:40 在struts-config.xml里: <action path="/..." scope="request" type="...." attribute="...." unknown="false" validate="false"> 这里,attribute的作用是什么??? |
2.Re:struts的action里的attribute是什么作用????? [Re: uu_snow] | Copy to clipboard |
Posted by: why Posted on: 2003-05-24 10:39 From Struts in Action: attribute (Set to name property) The name of the request-scope or session-scope attribute that is used to access our ActionForm bean, if it is other than the bean’s specified name. Optional if name is specified, otherwise not valid. From Programming Jakarta Struts attribute The name of the request- or session-scope attribute under which the form bean for this action can be accessed. A value is allowed here only if there is a form bean specified in the name attribute. This attribute is optional and has no default value. If both this attribute and the name attribute contain a value, this attribute will take precedence. From Struts Kick Start the attribute attribute enables you to specify a different unique ID to store the ActionForm under the request or session scope; otherwise, the name is used. |
3.Re:struts的action里的attribute是什么作用????? [Re: uu_snow] | Copy to clipboard |
Posted by: supermy Posted on: 2003-05-24 16:52 传递formbean的值 |
4.Re:struts的action里的attribute是什么作用????? [Re: uu_snow] | Copy to clipboard |
Posted by: uu_snow Posted on: 2003-05-27 17:35 能稍微说详细点吗???? 我还是不大明白 或者,能举个例子说明一下,什么时候,需要用到attribute |
5.Re:struts的action里的attribute是什么作用????? [Re: uu_snow] | Copy to clipboard |
Posted by: JasonZhang Posted on: 2003-05-27 22:15 I think it equivalents to the form bean name. If you specify the attribute, the attribute will be used to identify the formbean. You can call request or session object’s method getAttribute(String attribute_name) to retrieve the formbean object. |
6.Re:struts的action里的attribute是什么作用????? [Re: uu_snow] | Copy to clipboard |
Posted by: uu_snow Posted on: 2003-05-28 09:15 JasonZhang 在Action的execute的参数中,已经有FormBean了 我直接就可以得到formbean object了, 何必还有多弄出来一个attribute属性,去用getAttribute 取formbean object呢? |
7.Re:struts的action里的attribute是什么作用????? [Re: uu_snow] | Copy to clipboard |
Posted by: supermy Posted on: 2003-05-29 16:27 数据库取值->组装到formbean->自动赋予jsp叶面 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |