how to create a search field in struts.with code
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shally
<html:submit property="searchField" name="SearchFormBean"
onclick="javascropt:search()"
where searchField is the name fo the field as defined in
SearchFormBean.java
| Is This Answer Correct ? | 6 Yes | 8 No |
How duplicate form submission can be controlled in struts?
explain the struts-configuration file?
Can we integrate struts with spring?
What is the purpose of @before?
Wat is Difference between Mvc1 architecture and Mvc2 Architecture?
21 Answers HCL, IBM, Sanyaa Infotech,
Which class of struts is responsible to converts data types from string and vice versa?
What is the use of namespace in action mapping in Struts2?
How to upload struts file?
How can we get Servlet API Request, Response, HttpSession etc Objects in action classes?
What is the purpose of form-beans tag in struct-config.xml?
How many servlet controllers are used in a Struts Application?
How can we handle exceptions thrown by application in Struts2?