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

On 7/24/07, chengas123 <[EMAIL PROTECTED]> wrote:


I thought I would add that I put some debug code in my Action and I can
see
it being called when I type in the box.  Yet there does not appear to be
anything happening on the client side.  Is my JSON not formatted properly?
What's the problem here?

Thanks,
Ben



chengas123 wrote:
>
> Hi,
> I'm having trouble getting the autocompleter working.  When I type in
the
> box, nothing happens.
> I am using Struts 2.0.8 with JSON plugin 0.15.
>
> The relevant lines from my JSP are:
>     <s:url id="jsonList" value="/AutocompleteField.action"/>
>     <s:autocompleter name="city" theme="ajax" href="%{jsonList}"
> dataFieldName="json" cssStyle="width:132px" showDownArrow="false"
> autoComplete="true" searchType="startstring" />
>
> If I visit AutocompleteField.action?city=cle I get the following:
>
>
{"json":["CLEARFIELD","CLEARWATER","CLEBURNE","CLEMMONS","CLERMONT","CLEVELAND"]}
>
> Thanks,
> Ben
>  http://www.benmccann.com benmccann.com
>

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


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




--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Reply via email to