This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes form duplication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "form duplication" Watch "form duplication" New topic
Author

form duplication

madhuri ponasanapalli
Greenhorn

Joined: Dec 05, 2008
Posts: 3
Hi

I am working on an application with lot of forms . All forms have certain common fields e.g. like three cascading drop down boxes lastname,middlename and firstname. So when lastname is selected middlename dropdown is filled and when middlename is selected firstname drop down is filled. So all the forms at the moment have this code and the ajax calls to fill the drop downs . All the actions have a call to the database to get the lastname .

I was wondering if there is a way I could put these three drop down boxes in a tag or a include file and just add one line code in the forms instead of repeating the whole code in all forms.

Thank you
Madhuri
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
You can certainly create a custom JSP tag that would contain the three drop-down boxes. To include in a HTML page, all you need is to put the tag in the JSP file inside the Struts html:form element.
 
 
subject: form duplication
 
Similar Threads
drop down boxes
Use of Embeddable annotation
JSP and drop-down boxes
can you put multiple words in a database by using one statement
Create a Name class to manage different name changes of a person.