Musachy Barroso wrote:
> 
> It looks ok to me, not sure what is going on. Check:
> 
> http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-Autocompleter
> 
> for an example of working with both together.
> 
> musachy
> 

The example has a method called getOptions returning a Map.  However, I
don't see how getOptions is ever called.  
Also, the example is using Struts 2.1.0 which hasn't been released yet.  I
am only using 2.0.8.  The example has a tag include <%@ taglib prefix="sx"
uri="/struts-dojo-tags" %> which is not present in my project.
Also, does it matter that I am using a List instead of a Map?

I have the following in my struts.xml:
        <action name="AutocompleteField"
class="com.sherwin.whitePages.action.AutocompleteField">
            <result type="json" />
        </action>

And the following in my AutocompleteField.java action:
        private List json;
        public String execute() throws Exception {
                PersonDAO dao = new PersonDAO();
                if(!isEmpty(city)) {
                        json = dao.getCities(city);
                }
                return SUCCESS;
        }

-- 
View this message in context: 
http://www.nabble.com/-S2--Autocompleter-with-JSON-plugin-tf4132448.html#a11768451
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to