File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Regarding the Struts UI Tags of using   <s:textfield Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding the Struts UI Tags of using   <s:textfield" Watch "Regarding the Struts UI Tags of using   <s:textfield" New topic
Author

Regarding the Struts UI Tags of using <s:textfield

RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528


<s:textfield label="Employee Name" name="empname" size="15" maxlength="10" />

I am into basics of the Struts2 version.

Can anybody please take time and tell me what is name attribute (name="empname") means here??


If you want something you never had do something which you had never done
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It's the "name" attribute of the emitted HTML input field, hence the form parameter that will be submitted, and the name of the action property that will be filled with the form value.
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Thanks David.

What is understood with respect to name="empname" is that there will be a Action class and it will consist of the empname as a property with its getter and setter methods .

Am i correct??
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yes.
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Thanks a lot David.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding the Struts UI Tags of using <s:textfield