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 is ognl?

604


What is the struts in java?

512


What is the use of struts config xml file?

484


What is the purpose of @requiredstringvalidator?

564


What is action class?

584






What is apache struts cve 2017 5638?

554


What is the purpose of @validations annotation?

572


Can you explain value stack?

540


How an actionform bean is created?

575


Which tag is used to declare constants in struts xml?

478


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

575


How properties of a form are validated in Struts?

572


How struts2 supports internationalization?

659


What are the steps required for setting up validator framework in struts?

567


Which technologies can be used at view layer in struts?

649