You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jaladanki, Ravi" <Ra...@adp.com> on 2007/07/09 13:34:42 UTC

Help needed in Auto complete tag in Struts2


Hi All,

  I want to use the Struts autocompleter tag as mentioned below. 
<s:autocompleter theme="ajax" href="%{json}" name="state"
showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true"
notifyTopics="load"/> It is working fine if I give the result type is
hardcoded JavaScript file.

But I don't want to hard code the JavaScript file and I want to get the
response based upon the my user input like Google suggest. 

 Basically I want to use some action which can fetch data from my DB and
should send back the data to the client and that data should be filled.
  I am not able find any example for this problem. If anybody having
that example , please share with me . I need to have jsp file and java
file and action mapping how they are integrated..

  Looking for your help

Thanks
Ravi

-----------------------------------------
This message and any attachments are intended only for the use of
the addressee and may contain information that is privileged and
confidential. If the reader of the message is not the intended
recipient or an authorized representative of the intended
recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this
communication in error, notify the sender immediately by return
email and delete the message and any attachments from your system.


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


Re: Help needed in Auto complete tag in Struts2

Posted by Musachy Barroso <mu...@gmail.com>.
You can build the json string instead of returning  the hardcoded one, you
can use FreeMarker, JSP, Velocity, to generate it. You can also use the json
plugin:

http://cwiki.apache.org/S2PLUGINS/json-plugin.html

Look at the examples in showcase, there is one that builds the json result
using FreeMarker.

musachy

On 7/9/07, Jaladanki, Ravi <Ra...@adp.com> wrote:
>
>
>
> Hi All,
>
>   I want to use the Struts autocompleter tag as mentioned below.
> <s:autocompleter theme="ajax" href="%{json}" name="state"
> showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true"
> notifyTopics="load"/> It is working fine if I give the result type is
> hardcoded JavaScript file.
>
> But I don't want to hard code the JavaScript file and I want to get the
> response based upon the my user input like Google suggest.
>
> Basically I want to use some action which can fetch data from my DB and
> should send back the data to the client and that data should be filled.
>   I am not able find any example for this problem. If anybody having
> that example , please share with me . I need to have jsp file and java
> file and action mapping how they are integrated..
>
>   Looking for your help
>
> Thanks
> Ravi
>
> -----------------------------------------
> This message and any attachments are intended only for the use of
> the addressee and may contain information that is privileged and
> confidential. If the reader of the message is not the intended
> recipient or an authorized representative of the intended
> recipient, you are hereby notified that any dissemination of this
> communication is strictly prohibited. If you have received this
> communication in error, notify the sender immediately by return
> email and delete the message and any attachments from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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

RE: Help needed in Auto complete tag in Struts2

Posted by "Jaladanki, Ravi" <Ra...@adp.com>.
Thank you very much.. It is working.. 

Thanks
Ravi
-----Original Message-----
From: Musachy Barroso [mailto:musachy@gmail.com] 
Sent: Tuesday, July 10, 2007 6:55 PM
To: Struts Users Mailing List
Subject: Re: Help needed in Auto complete tag in Struts2


Hint: Look at AutocompleterExampleAction and options.ftl in showcase.

musachy

On 7/10/07, Jaladanki, Ravi <Ra...@adp.com> wrote:
>
> Hi Musachy,
>
> Thanks for your reply
>         I have seen  show case example but It is returning directly 
> JSONList.js file which is hard coded in the JavaScript file. But I 
> need to get them from Action and the same time I have seen json 
> plug-in . But it is not giving complete information. If you have any 
> sample application or location s then please share with me. I required

> very badly
>
> Thanks
> Ravi Kumar Jaladanki
>
>
> -----Original Message-----
> From: Musachy Barroso [mailto:musachy@gmail.com]
> Sent: Tuesday, July 10, 2007 6:40 PM
> To: Struts Users Mailing List
> Subject: Re: Help needed in Auto complete tag in Struts2
>
>
> Did you look at the example in showcase and the JSON plugin?
>
> musachy
>
> On 7/10/07, Jaladanki, Ravi <Ra...@adp.com> wrote:
> >
> > Hi All,
> >   I am waiting for your valuable suggestions. Can any one help me in

> > this....
> >
> > Thanks
> > Ravi
> >
> > -----Original Message-----
> > From: Jaladanki, Ravi
> > Sent: Monday, July 09, 2007 5:05 PM
> > To: user@struts.apache.org
> > Subject: Help needed in Auto complete tag in Struts2
> >
> >
> >
> >
> > Hi All,
> >
> >   I want to use the Struts autocompleter tag as mentioned below. 
> > <s:autocompleter theme="ajax" href="%{json}" name="state" 
> > showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true" 
> > notifyTopics="load"/> It is working fine if I give the result type 
> > is hardcoded JavaScript file.
> >
> > But I don't want to hard code the JavaScript file and I want to get 
> > the response based upon the my user input like Google suggest.
> >
> > Basically I want to use some action which can fetch data from my DB 
> > and should send back the data to the client and that data should be
> filled.
> >   I am not able find any example for this problem. If anybody having

> > that example , please share with me . I need to have jsp file and 
> > java
>
> > file and action mapping how they are integrated..
> >
> >   Looking for your help
> >
> > Thanks
> > Ravi
> >
> > -----------------------------------------
> > This message and any attachments are intended only for the use of 
> > the addressee and may contain information that is privileged and 
> > confidential. If the reader of the message is not the intended 
> > recipient or an authorized representative of the intended recipient,

> > you are hereby notified that any dissemination of this communication

> > is strictly prohibited. If you have received this communication in 
> > error, notify the sender immediately by return email and delete the 
> > message and any attachments from your system.
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


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


Re: Help needed in Auto complete tag in Struts2

Posted by Musachy Barroso <mu...@gmail.com>.
Hint: Look at AutocompleterExampleAction and options.ftl in showcase.

musachy

On 7/10/07, Jaladanki, Ravi <Ra...@adp.com> wrote:
>
> Hi Musachy,
>
> Thanks for your reply
>         I have seen  show case example but It is returning directly
> JSONList.js file which is hard coded in the JavaScript file. But I need
> to get them from Action and the same time I have seen json plug-in . But
> it is not giving complete information. If you have any sample
> application or location s then please share with me. I required very
> badly
>
> Thanks
> Ravi Kumar Jaladanki
>
>
> -----Original Message-----
> From: Musachy Barroso [mailto:musachy@gmail.com]
> Sent: Tuesday, July 10, 2007 6:40 PM
> To: Struts Users Mailing List
> Subject: Re: Help needed in Auto complete tag in Struts2
>
>
> Did you look at the example in showcase and the JSON plugin?
>
> musachy
>
> On 7/10/07, Jaladanki, Ravi <Ra...@adp.com> wrote:
> >
> > Hi All,
> >   I am waiting for your valuable suggestions. Can any one help me in
> > this....
> >
> > Thanks
> > Ravi
> >
> > -----Original Message-----
> > From: Jaladanki, Ravi
> > Sent: Monday, July 09, 2007 5:05 PM
> > To: user@struts.apache.org
> > Subject: Help needed in Auto complete tag in Struts2
> >
> >
> >
> >
> > Hi All,
> >
> >   I want to use the Struts autocompleter tag as mentioned below.
> > <s:autocompleter theme="ajax" href="%{json}" name="state"
> > showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true"
> > notifyTopics="load"/> It is working fine if I give the result type is
> > hardcoded JavaScript file.
> >
> > But I don't want to hard code the JavaScript file and I want to get
> > the response based upon the my user input like Google suggest.
> >
> > Basically I want to use some action which can fetch data from my DB
> > and should send back the data to the client and that data should be
> filled.
> >   I am not able find any example for this problem. If anybody having
> > that example , please share with me . I need to have jsp file and java
>
> > file and action mapping how they are integrated..
> >
> >   Looking for your help
> >
> > Thanks
> > Ravi
> >
> > -----------------------------------------
> > This message and any attachments are intended only for the use of the
> > addressee and may contain information that is privileged and
> > confidential. If the reader of the message is not the intended
> > recipient or an authorized representative of the intended recipient,
> > you are hereby notified that any dissemination of this communication
> > is strictly prohibited. If you have received this communication in
> > error, notify the sender immediately by return email and delete the
> > message and any attachments from your system.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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

RE: Help needed in Auto complete tag in Struts2

Posted by "Jaladanki, Ravi" <Ra...@adp.com>.
Hi Musachy,

Thanks for your reply 
        I have seen  show case example but It is returning directly
JSONList.js file which is hard coded in the JavaScript file. But I need
to get them from Action and the same time I have seen json plug-in . But
it is not giving complete information. If you have any sample
application or location s then please share with me. I required very
badly

Thanks
Ravi Kumar Jaladanki


-----Original Message-----
From: Musachy Barroso [mailto:musachy@gmail.com] 
Sent: Tuesday, July 10, 2007 6:40 PM
To: Struts Users Mailing List
Subject: Re: Help needed in Auto complete tag in Struts2


Did you look at the example in showcase and the JSON plugin?

musachy

On 7/10/07, Jaladanki, Ravi <Ra...@adp.com> wrote:
>
> Hi All,
>   I am waiting for your valuable suggestions. Can any one help me in 
> this....
>
> Thanks
> Ravi
>
> -----Original Message-----
> From: Jaladanki, Ravi
> Sent: Monday, July 09, 2007 5:05 PM
> To: user@struts.apache.org
> Subject: Help needed in Auto complete tag in Struts2
>
>
>
>
> Hi All,
>
>   I want to use the Struts autocompleter tag as mentioned below. 
> <s:autocompleter theme="ajax" href="%{json}" name="state" 
> showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true" 
> notifyTopics="load"/> It is working fine if I give the result type is 
> hardcoded JavaScript file.
>
> But I don't want to hard code the JavaScript file and I want to get 
> the response based upon the my user input like Google suggest.
>
> Basically I want to use some action which can fetch data from my DB 
> and should send back the data to the client and that data should be
filled.
>   I am not able find any example for this problem. If anybody having 
> that example , please share with me . I need to have jsp file and java

> file and action mapping how they are integrated..
>
>   Looking for your help
>
> Thanks
> Ravi
>
> -----------------------------------------
> This message and any attachments are intended only for the use of the 
> addressee and may contain information that is privileged and 
> confidential. If the reader of the message is not the intended 
> recipient or an authorized representative of the intended recipient, 
> you are hereby notified that any dissemination of this communication 
> is strictly prohibited. If you have received this communication in 
> error, notify the sender immediately by return email and delete the 
> message and any attachments from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


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


Re: Help needed in Auto complete tag in Struts2

Posted by Musachy Barroso <mu...@gmail.com>.
Did you look at the example in showcase and the JSON plugin?

musachy

On 7/10/07, Jaladanki, Ravi <Ra...@adp.com> wrote:
>
> Hi All,
>   I am waiting for your valuable suggestions. Can any one help me in
> this....
>
> Thanks
> Ravi
>
> -----Original Message-----
> From: Jaladanki, Ravi
> Sent: Monday, July 09, 2007 5:05 PM
> To: user@struts.apache.org
> Subject: Help needed in Auto complete tag in Struts2
>
>
>
>
> Hi All,
>
>   I want to use the Struts autocompleter tag as mentioned below.
> <s:autocompleter theme="ajax" href="%{json}" name="state"
> showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true"
> notifyTopics="load"/> It is working fine if I give the result type is
> hardcoded JavaScript file.
>
> But I don't want to hard code the JavaScript file and I want to get the
> response based upon the my user input like Google suggest.
>
> Basically I want to use some action which can fetch data from my DB and
> should send back the data to the client and that data should be filled.
>   I am not able find any example for this problem. If anybody having
> that example , please share with me . I need to have jsp file and java
> file and action mapping how they are integrated..
>
>   Looking for your help
>
> Thanks
> Ravi
>
> -----------------------------------------
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and
> confidential. If the reader of the message is not the intended recipient
> or an authorized representative of the intended recipient, you are
> hereby notified that any dissemination of this communication is strictly
> prohibited. If you have received this communication in error, notify the
> sender immediately by return email and delete the message and any
> attachments from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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

RE: Help needed in Auto complete tag in Struts2

Posted by "Jaladanki, Ravi" <Ra...@adp.com>.
Hi All,
  I am waiting for your valuable suggestions. Can any one help me in
this....

Thanks
Ravi

-----Original Message-----
From: Jaladanki, Ravi 
Sent: Monday, July 09, 2007 5:05 PM
To: user@struts.apache.org
Subject: Help needed in Auto complete tag in Struts2




Hi All,

  I want to use the Struts autocompleter tag as mentioned below. 
<s:autocompleter theme="ajax" href="%{json}" name="state"
showDownArrow="false" loadMinimumCount="3" loadOnTextChange="true"
notifyTopics="load"/> It is working fine if I give the result type is
hardcoded JavaScript file.

But I don't want to hard code the JavaScript file and I want to get the
response based upon the my user input like Google suggest. 

 Basically I want to use some action which can fetch data from my DB and
should send back the data to the client and that data should be filled.
  I am not able find any example for this problem. If anybody having
that example , please share with me . I need to have jsp file and java
file and action mapping how they are integrated..

  Looking for your help

Thanks
Ravi

-----------------------------------------
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and
confidential. If the reader of the message is not the intended recipient
or an authorized representative of the intended recipient, you are
hereby notified that any dissemination of this communication is strictly
prohibited. If you have received this communication in error, notify the
sender immediately by return email and delete the message and any
attachments from your system.


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



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