You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ankur Agar <an...@tcs.com> on 2008/03/14 11:36:35 UTC

Issue In Autocompleter

Hi All,
      I am tryin to make an autocomplete work with its theme="ajax"
I am using struts 2.0.x
The data coming from the action is in JSON format

{"Arizona":"AZ","Arkansas":"AR","Armed":"AE","California":"CA","Florida":"FL"}
the jsp code is
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
  <head>
    <s:head theme="ajax" debug="true"/>
  </head>
     <s:property value="jsonList"/>
  <body>
     <s:url id="ajaxCallUrl" value="autocompleter1.action">
     </s:url>
    <h1>Struts 2 Autocompleter Example!</h1>
    <s:label name="stateName" value="Select State Name:" />
    <br>
     <s:autocompleter name="state" theme="ajax"  href="%{ajaxCallUrl}"
loadOnTextChange="true" loadMinimumCount="1"/>
    <br>
  </body>
</html>

But still the autocomplete is not working gives a syntax error on page when
run in debug mode. In one of the links I found that struts-dojo-tags has to
be used as a plugin in struts 2.0.x  But also in one of the links it was
specified that its embedded in struts-core.jar.
Please help me out.
Regards,
Ankur

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Issue In Autocompleter

Posted by Ozzy <va...@tcs.com>.
Dude I dont think autocomplete would be complete till you actually try to
complete it.

Now we are thinking!!!!!!!!!!!!!



Ankur Agar wrote:
> 
> 
> Hi All,
>       I am tryin to make an autocomplete work with its theme="ajax"
> I am using struts 2.0.x
> The data coming from the action is in JSON format
> 
> {"Arizona":"AZ","Arkansas":"AR","Armed":"AE","California":"CA","Florida":"FL"}
> the jsp code is
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <html>
>   <head>
>     <s:head theme="ajax" debug="true"/>
>   </head>
>      <s:property value="jsonList"/>
>   <body>
>      <s:url id="ajaxCallUrl" value="autocompleter1.action">
>      </s:url>
>     <h1>Struts 2 Autocompleter Example!</h1>
>     <s:label name="stateName" value="Select State Name:" />
>     <br>
>      <s:autocompleter name="state" theme="ajax"  href="%{ajaxCallUrl}"
> loadOnTextChange="true" loadMinimumCount="1"/>
>     <br>
>   </body>
> </html>
> 
> But still the autocomplete is not working gives a syntax error on page
> when
> run in debug mode. In one of the links I found that struts-dojo-tags has
> to
> be used as a plugin in struts 2.0.x  But also in one of the links it was
> specified that its embedded in struts-core.jar.
> Please help me out.
> Regards,
> Ankur
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Issue-In-Autocompleter-tp16048547p16114440.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Issue In Autocompleter

Posted by Laurie Harper <la...@holoweb.net>.
Ankur Agar wrote:
> Hi All,
>       I am tryin to make an autocomplete work with its theme="ajax"
> I am using struts 2.0.x
> The data coming from the action is in JSON format
> 
> [...]
> 
> But still the autocomplete is not working gives a syntax error on page when

Including the actual error message would help. Is it reporting a JSP 
syntax error? A Javascript error in the browser? Something else?...

> run in debug mode. In one of the links I found that struts-dojo-tags has to
> be used as a plugin in struts 2.0.x  But also in one of the links it was
> specified that its embedded in struts-core.jar.

Dojo and the Ajax tags have been moved to a plugin in Struts 2.1.x. They 
are bundled in 2.0.x.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org