aspose 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
 
Similar Threads
s:property tag values in action side
how to fetch JSP text field value
tomcat jsp question to ask
Could not read mappings from resource ?
javax.el.PropertyNotFoundException: Property 'empname' not found on type java.lang.String