how to create a search field in struts.with code

Answer Posted / shally

<html:submit property="searchField" name="SearchFormBean"
onclick="javascript:search()"/>

search() {
document.getElementById('searchField').value='Search';

}

Then in action class...do the search logic after
checking "Search" action .

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the some useful annotations introduced in struts2?

629


What does validation interceptor?

638


What are action errors and error and what are the consequences they impose?

663


What do you mean by action errors and what are the results they force?

676


How can we write our own interceptor and map it for action?

658






Can I have html form property without associated getter and setter formbean methods?

668


What are the classes used as part of struts framework ?

597


In struts.xml, what does the attribute "method" stands for in the "action" tag?

615


how to develop the submit and search operations in single jsp using struts?

2646


What is the purpose of struts.properties in struct2?

599


Are the struts tags xhtml compliant ?

623


How many action classes can be used in struts application?

605


Is there a particularly good ide to use with struts?

590


What are the life cycle methods of interceptor?

601


Explain the necessity of empty tag?

674