This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am sharing my idea with you. Using struts autocomplete tag i created a text field to input the value like 'a*' to display values starting with 'a'. So actually it need to be send to action class and search in the database using sql query with LIKE operation to retrieve the results and stored in an arraylist and should be popup in the text field so that we can select the list of values which start with 'a'. But my problem is that I am not able to send value which we type in the text field that should be passed to action class and perform some database operation and display the result.
<s:label name="stateName" value="Select State Name:" />
<s:autocompleter theme="simple" list="state" name="StateName"/>
we are accessing the list as mentioned above. And we should not use the submit button in order call the action class.
vinayreddy podduturi wrote:
And in my case what is the use of href?
As the example says "The text entered on the autocompleter is passed as a parameter to the url specified in "href"", so the value of href should be the name of your action. You should have a getter and setter for whatever the autocompleter name is in your action.
I think you have it backwards. The href should be the URL that you get the list from, and the name should be the name of a field that you will be setting on the action:"state".
I don't think you want to use the "list" as you are using an action to populate the text box, and you don't appear to have a getter/setter of that name in your action.
Joined: Mar 11, 2012
If Possible please can you show me by rewriting the code and post it.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: implementing Wild Card search using struts textbox or autocomplete