Hi All, In firebug console it is displaying data correctly(what I set in Action class), like I set one two three These values are displaying correctly as drop down for "s:textfield" but the problem is when I select any value from drop down it is showing a comma after that value(example, if select one then in textfiled it is showing one,) I added 'tagField' setter/getter(in action class) for this textfield but I don't know why this is showing comma after variable value... Can anyone please let me know what is causing this comma thing in s:textfield.. Thanks in advance. Regards, Sharath.
--- On Fri, 4/23/10, sharath karnati <karna...@yahoo.com> wrote: From: sharath karnati <karna...@yahoo.com> Subject: Re: Jquery autocomplete with struts2. To: zo...@sparecreative.com Cc: "Struts Users Mailing List" <user@struts.apache.org> Date: Friday, April 23, 2010, 9:45 AM Hi Zoran, If you check this example, you can see the data which is returning for PHP is NOT JSON object. In case, if it returns JSON then you can see this information in JSON tab in firebug console(mozzilla), it is plain HTML. If he returns JSON then he need to use $.getJSON function to fill data for textfiled(used for autocompleter)... I solved this problem using "ServletActionContext.setResponse()" sending data in plain text(HTML) rather than using any JSON thing. Thanks, Sharath. --- On Fri, 4/23/10, Zoran Avtarovski <zo...@sparecreative.com> wrote: From: Zoran Avtarovski <zo...@sparecreative.com> Subject: Re: Jquery autocomplete with struts2. To: "Struts Users Mailing List" <user@struts.apache.org>, "sharath karnati" <karna...@yahoo.com> Date: Friday, April 23, 2010, 1:15 AM I hate to be the one to say it, but I don¹t think the issue here is jQuery but your understanding of Struts2. I think you first need to get your head around using S2 and then migrating that simple php example will be easy. You fill find the only difference between the PHP example and using a json response is that the PHP example converts the data to json in the page context. Z. > > Hi All, > > Say I have java "arraylist" in action and how to set this in resonse object > > ServletActionContext.setResponse() > > How to do this in struts2?? > > Thanks, > Sharath. > > --- On Thu, 4/22/10, sharath karnati <karna...@yahoo.com> wrote: > > > From: sharath karnati <karna...@yahoo.com> > Subject: Re: Jquery autocomplete with struts2. > To: "Struts Users Mailing List" <user@struts.apache.org> > Date: Thursday, April 22, 2010, 3:36 PM > > > Please find below example > > http://makhaer.blogspot.com/2008/12/jquery-autocomplete.html > > in this example, he is just using jquery with textfield for doing autocomplete > with PHP. I'd like to do samething with struts2 action. > > Can anyone please let me know, how to send data from action to .jsp to display > autocomplete rather than using another plug-ins. > > Thanks, > Sharath. > > --- On Thu, 4/22/10, Johannes Geppert <jo...@web.de> wrote: > > > From: Johannes Geppert <jo...@web.de> > Subject: Re: Jquery autocomplete with struts2. > To: user@struts.apache.org > Date: Thursday, April 22, 2010, 2:29 PM > > > > Hello, > > since version 2.0.0 the Struts2 jQuery Plugin have a autocompleter tag. > This is an easy way to implement an Autocompleter. > > See: > http://code.google.com/p/struts2-jquery/wiki/AutocompleterTag > > Best Regards > > Johannes Geppert > > > sharath wrote: >> > >> > Hi All, >> > >> > I'm trying to use Jquery autocomplete with struts2. The example for >> > using Jquery autocomplete is given below(link) >> > >> > http://makhaer.blogspot.com/2008/12/jquery-autocomplete.html >> > >> > In this example, author is returning data with .php similarly I'd like >> > to return data from struts2 action(not with json object) >> > >> > Can anyone please let me know how to return data from struts2 action >> > for accomplishing same thing. >> > >> > Thanks in advance. >> > >> > Regards, >> > Sharath. >> > > > > ----- > --- > web: http://www.jgeppert.com > twitter: http://twitter.com/jogep