Hi all,
I have a problem with an autocomplete field. Unfortunately, I'm starting to use
struts right now, but I have to complete this task in a couple of days.
I have a web application based on struts2, with a graphic template based on the bootstrap. For the persistence, the web application uses a mysql database that is accessed through hibernate.
The autocomplete field is a struts tag called sj:autocompleter. The problem is that I am absolutely unable to get it to work! The field should show, as options, a set of strings extracted from the database. How do I launch an action when typing in the field to view the strings extracted from the db? The online examples only talk about json and I am not able to adapt them to my needs. What I have written so far is:
At the moment, the Login action is only a "test action" so it does not return anything, but I don't receive any error message..absolutely nothing happens when I type in the field...no error, no message, nothing...simply, the action is not called.
How can I solve the problem? what should be the action implementation?
Thanks in advance!
P.S. I have correctly imported the struts2 jquery plugin.