You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by shekher awasthi <sh...@gmail.com> on 2008/10/16 12:03:10 UTC

Struts2+YUI

Hi All,

I am trying to integrate struts2 with YUI ,but facing some problems with
this. I want that when my action get called by YUI it must return a
arrayList of string which i must be able to handle using the YUI.

For this i took the help of example from YUI site and able to hit the action
but my problem is that how can i get the access to the arraylist which my
action is populating when its execute methos is called .below i m pasting
the code from my action calss as well as the YUI code.
Plaese let me know how can i get this arraylist in my YUI code
*
YUI CODE*

<div id="container"></div>
<script type="text/javascript" language="javascript">

    var div = document.getElementById('container');

    var handleSuccess = function(o){
    alert("pass");


    if(o.responseText !== undefined){
        alert("test11");

        div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
        div.innerHTML += "<li>Status code message: " + o.statusText +
"</li>";
        div.innerHTML += "<li>HTTP headers: <ul>" + o.getAllResponseHeaders
+ "</ul></li>";
        div.innerHTML += "<li>Server response: " + o.getList().toString +
"</li>";
        div.innerHTML += "<li>Argument object: Object ( [foo] => " +
o.argument.foo +
                         " [bar] => " + o.argument.bar +" )</li>";
    }


}

var handleFailure = function(o){
        alert("fail");
        YAHOO.log("The failure handler was called.  tId: " + o.tId + ".",
"info", "example");

    if(o.responseText !== undefined){
        div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
        div.innerHTML += "<li>Status code message: " + o.statusText +
"</li></ul>";
    }
}

var callback =
{
  success:handleSuccess,
  failure:handleFailure,
  argument: { foo:"foo", bar:"bar" }
};

var sUrl = "YUITestAction.action";



    function makeRequest(){
    alert("test");

    var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);



}
    </script>

*MY ACTION CLASS*

public class YUITestAction extends ActionSupport{

    /**
     *
     */
    private static final long serialVersionUID = 1926031204500756104L;
    ArrayList<String> list=new ArrayList<String>();
    public String execute() throws Exception{
        System.out.println("inside the execute method");

        return SUCCESS;
    }

    public ArrayList<String> getList(){

        list.add("test1");
        list.add("test2");
        list.add("aum");
        list.add("arun");
        list.add("mannu");
        list.add("umesh");

        return list;
    }
}

any help in this regard is much appricaited

--shekher

Re: Struts2+YUI

Posted by aum strut <au...@gmail.com>.
sorry for using another mail box for posting the question i am geting some
problem in my ID while posting the question in the mail list....so i have
used my alternative ID.

On Thu, Oct 16, 2008 at 4:31 PM, aum strut <au...@gmail.com> wrote:

> No i want to get this arraylist using YUI Ajax functionality
>
> i have a drop down in my jsp page and i am calling the ajax function with
> onChange event the code which i have used for calling my action class is
> working fine and even i am able to hot my action class using YUI APIbut what
> i want is that i should be able to use the Arraylilst which my action is
> populating using only YUI so can anybody tell me how can i use the YUI to
> get access to this Arraylist which is being populated by my action class so
> that i can use this arraylist for my other work using the ajax function
>
>
> On Thu, Oct 16, 2008 at 4:08 PM, Hardik Shah <ha...@yahoo.com> wrote:
>
>>
>> hi
>>
>> you can use
>>              <s:iterator>
>>      <s:property>
>> </S:iterator>
>>
>> for getting array list of valuestack
>>
>> but you should setter and getter for this arraylist for accessing it from
>> jsp side
>>
>>
>> shekher awasthi wrote:
>> >
>> > Hi All,
>> >
>> > I am trying to integrate struts2 with YUI ,but facing some problems with
>> > this. I want that when my action get called by YUI it must return a
>> > arrayList of string which i must be able to handle using the YUI.
>> >
>> > For this i took the help of example from YUI site and able to hit the
>> > action
>> > but my problem is that how can i get the access to the arraylist which
>> my
>> > action is populating when its execute methos is called .below i m
>> pasting
>> > the code from my action calss as well as the YUI code.
>> > Plaese let me know how can i get this arraylist in my YUI code
>> > *
>> > YUI CODE*
>> >
>> > <div id="container"></div>
>> > <script type="text/javascript" language="javascript">
>> >
>> >     var div = document.getElementById('container');
>> >
>> >     var handleSuccess = function(o){
>> >     alert("pass");
>> >
>> >
>> >     if(o.responseText !== undefined){
>> >         alert("test11");
>> >
>> >         div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
>> >         div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>> >         div.innerHTML += "<li>Status code message: " + o.statusText +
>> > "</li>";
>> >         div.innerHTML += "<li>HTTP headers: <ul>" +
>> > o.getAllResponseHeaders
>> > + "</ul></li>";
>> >         div.innerHTML += "<li>Server response: " + o.getList().toString
>> +
>> > "</li>";
>> >         div.innerHTML += "<li>Argument object: Object ( [foo] => " +
>> > o.argument.foo +
>> >                          " [bar] => " + o.argument.bar +" )</li>";
>> >     }
>> >
>> >
>> > }
>> >
>> > var handleFailure = function(o){
>> >         alert("fail");
>> >         YAHOO.log("The failure handler was called.  tId: " + o.tId +
>> ".",
>> > "info", "example");
>> >
>> >     if(o.responseText !== undefined){
>> >         div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
>> >         div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>> >         div.innerHTML += "<li>Status code message: " + o.statusText +
>> > "</li></ul>";
>> >     }
>> > }
>> >
>> > var callback =
>> > {
>> >   success:handleSuccess,
>> >   failure:handleFailure,
>> >   argument: { foo:"foo", bar:"bar" }
>> > };
>> >
>> > var sUrl = "YUITestAction.action";
>> >
>> >
>> >
>> >     function makeRequest(){
>> >     alert("test");
>> >
>> >     var request = YAHOO.util.Connect.asyncRequest('GET', sUrl,
>> callback);
>> >
>> >
>> >
>> > }
>> >     </script>
>> >
>> > *MY ACTION CLASS*
>> >
>> > public class YUITestAction extends ActionSupport{
>> >
>> >     /**
>> >      *
>> >      */
>> >     private static final long serialVersionUID = 1926031204500756104L;
>> >     ArrayList<String> list=new ArrayList<String>();
>> >     public String execute() throws Exception{
>> >         System.out.println("inside the execute method");
>> >
>> >         return SUCCESS;
>> >     }
>> >
>> >     public ArrayList<String> getList(){
>> >
>> >         list.add("test1");
>> >         list.add("test2");
>> >         list.add("aum");
>> >         list.add("arun");
>> >         list.add("mannu");
>> >         list.add("umesh");
>> >
>> >         return list;
>> >     }
>> > }
>> >
>> > any help in this regard is much appricaited
>> >
>> > --shekher
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts2%2BYUI-tp20010680p20011032.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: Struts2+YUI

Posted by aum strut <au...@gmail.com>.
No i want to get this arraylist using YUI Ajax functionality

i have a drop down in my jsp page and i am calling the ajax function with
onChange event the code which i have used for calling my action class is
working fine and even i am able to hot my action class using YUI APIbut what
i want is that i should be able to use the Arraylilst which my action is
populating using only YUI so can anybody tell me how can i use the YUI to
get access to this Arraylist which is being populated by my action class so
that i can use this arraylist for my other work using the ajax function

On Thu, Oct 16, 2008 at 4:08 PM, Hardik Shah <ha...@yahoo.com> wrote:

>
> hi
>
> you can use
>              <s:iterator>
>      <s:property>
> </S:iterator>
>
> for getting array list of valuestack
>
> but you should setter and getter for this arraylist for accessing it from
> jsp side
>
>
> shekher awasthi wrote:
> >
> > Hi All,
> >
> > I am trying to integrate struts2 with YUI ,but facing some problems with
> > this. I want that when my action get called by YUI it must return a
> > arrayList of string which i must be able to handle using the YUI.
> >
> > For this i took the help of example from YUI site and able to hit the
> > action
> > but my problem is that how can i get the access to the arraylist which my
> > action is populating when its execute methos is called .below i m pasting
> > the code from my action calss as well as the YUI code.
> > Plaese let me know how can i get this arraylist in my YUI code
> > *
> > YUI CODE*
> >
> > <div id="container"></div>
> > <script type="text/javascript" language="javascript">
> >
> >     var div = document.getElementById('container');
> >
> >     var handleSuccess = function(o){
> >     alert("pass");
> >
> >
> >     if(o.responseText !== undefined){
> >         alert("test11");
> >
> >         div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
> >         div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
> >         div.innerHTML += "<li>Status code message: " + o.statusText +
> > "</li>";
> >         div.innerHTML += "<li>HTTP headers: <ul>" +
> > o.getAllResponseHeaders
> > + "</ul></li>";
> >         div.innerHTML += "<li>Server response: " + o.getList().toString +
> > "</li>";
> >         div.innerHTML += "<li>Argument object: Object ( [foo] => " +
> > o.argument.foo +
> >                          " [bar] => " + o.argument.bar +" )</li>";
> >     }
> >
> >
> > }
> >
> > var handleFailure = function(o){
> >         alert("fail");
> >         YAHOO.log("The failure handler was called.  tId: " + o.tId + ".",
> > "info", "example");
> >
> >     if(o.responseText !== undefined){
> >         div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
> >         div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
> >         div.innerHTML += "<li>Status code message: " + o.statusText +
> > "</li></ul>";
> >     }
> > }
> >
> > var callback =
> > {
> >   success:handleSuccess,
> >   failure:handleFailure,
> >   argument: { foo:"foo", bar:"bar" }
> > };
> >
> > var sUrl = "YUITestAction.action";
> >
> >
> >
> >     function makeRequest(){
> >     alert("test");
> >
> >     var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
> >
> >
> >
> > }
> >     </script>
> >
> > *MY ACTION CLASS*
> >
> > public class YUITestAction extends ActionSupport{
> >
> >     /**
> >      *
> >      */
> >     private static final long serialVersionUID = 1926031204500756104L;
> >     ArrayList<String> list=new ArrayList<String>();
> >     public String execute() throws Exception{
> >         System.out.println("inside the execute method");
> >
> >         return SUCCESS;
> >     }
> >
> >     public ArrayList<String> getList(){
> >
> >         list.add("test1");
> >         list.add("test2");
> >         list.add("aum");
> >         list.add("arun");
> >         list.add("mannu");
> >         list.add("umesh");
> >
> >         return list;
> >     }
> > }
> >
> > any help in this regard is much appricaited
> >
> > --shekher
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Struts2%2BYUI-tp20010680p20011032.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: Struts2+YUI

Posted by Hardik Shah <ha...@yahoo.com>.
hi

you can use 
              <s:iterator>
      <s:property>
</S:iterator>

for getting array list of valuestack

but you should setter and getter for this arraylist for accessing it from
jsp side


shekher awasthi wrote:
> 
> Hi All,
> 
> I am trying to integrate struts2 with YUI ,but facing some problems with
> this. I want that when my action get called by YUI it must return a
> arrayList of string which i must be able to handle using the YUI.
> 
> For this i took the help of example from YUI site and able to hit the
> action
> but my problem is that how can i get the access to the arraylist which my
> action is populating when its execute methos is called .below i m pasting
> the code from my action calss as well as the YUI code.
> Plaese let me know how can i get this arraylist in my YUI code
> *
> YUI CODE*
> 
> <div id="container"></div>
> <script type="text/javascript" language="javascript">
> 
>     var div = document.getElementById('container');
> 
>     var handleSuccess = function(o){
>     alert("pass");
> 
> 
>     if(o.responseText !== undefined){
>         alert("test11");
> 
>         div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
>         div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>         div.innerHTML += "<li>Status code message: " + o.statusText +
> "</li>";
>         div.innerHTML += "<li>HTTP headers: <ul>" +
> o.getAllResponseHeaders
> + "</ul></li>";
>         div.innerHTML += "<li>Server response: " + o.getList().toString +
> "</li>";
>         div.innerHTML += "<li>Argument object: Object ( [foo] => " +
> o.argument.foo +
>                          " [bar] => " + o.argument.bar +" )</li>";
>     }
> 
> 
> }
> 
> var handleFailure = function(o){
>         alert("fail");
>         YAHOO.log("The failure handler was called.  tId: " + o.tId + ".",
> "info", "example");
> 
>     if(o.responseText !== undefined){
>         div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
>         div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>         div.innerHTML += "<li>Status code message: " + o.statusText +
> "</li></ul>";
>     }
> }
> 
> var callback =
> {
>   success:handleSuccess,
>   failure:handleFailure,
>   argument: { foo:"foo", bar:"bar" }
> };
> 
> var sUrl = "YUITestAction.action";
> 
> 
> 
>     function makeRequest(){
>     alert("test");
> 
>     var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
> 
> 
> 
> }
>     </script>
> 
> *MY ACTION CLASS*
> 
> public class YUITestAction extends ActionSupport{
> 
>     /**
>      *
>      */
>     private static final long serialVersionUID = 1926031204500756104L;
>     ArrayList<String> list=new ArrayList<String>();
>     public String execute() throws Exception{
>         System.out.println("inside the execute method");
> 
>         return SUCCESS;
>     }
> 
>     public ArrayList<String> getList(){
> 
>         list.add("test1");
>         list.add("test2");
>         list.add("aum");
>         list.add("arun");
>         list.add("mannu");
>         list.add("umesh");
> 
>         return list;
>     }
> }
> 
> any help in this regard is much appricaited
> 
> --shekher
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts2%2BYUI-tp20010680p20011032.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: Struts2+YUI

Posted by Owen Berry <ow...@gmail.com>.
You need to use the Struts JSON plugin to format your list as a JSON
response. Your Javascript code can then call eval on the JSON string
to create a Javascript object. Either that, or look into the YUI JSON
module. Another alternative might be to look at the YUI datasource
module, although I haven't used it, so I'm not sure on the details.

On Thu, Oct 16, 2008 at 6:03 AM, shekher awasthi
<sh...@gmail.com> wrote:
> Hi All,
>
> I am trying to integrate struts2 with YUI ,but facing some problems with
> this. I want that when my action get called by YUI it must return a
> arrayList of string which i must be able to handle using the YUI.
>
> For this i took the help of example from YUI site and able to hit the action
> but my problem is that how can i get the access to the arraylist which my
> action is populating when its execute methos is called .below i m pasting
> the code from my action calss as well as the YUI code.
> Plaese let me know how can i get this arraylist in my YUI code
> *
> YUI CODE*
>
> <div id="container"></div>
> <script type="text/javascript" language="javascript">
>
>    var div = document.getElementById('container');
>
>    var handleSuccess = function(o){
>    alert("pass");
>
>
>    if(o.responseText !== undefined){
>        alert("test11");
>
>        div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
>        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>        div.innerHTML += "<li>Status code message: " + o.statusText +
> "</li>";
>        div.innerHTML += "<li>HTTP headers: <ul>" + o.getAllResponseHeaders
> + "</ul></li>";
>        div.innerHTML += "<li>Server response: " + o.getList().toString +
> "</li>";
>        div.innerHTML += "<li>Argument object: Object ( [foo] => " +
> o.argument.foo +
>                         " [bar] => " + o.argument.bar +" )</li>";
>    }
>
>
> }
>
> var handleFailure = function(o){
>        alert("fail");
>        YAHOO.log("The failure handler was called.  tId: " + o.tId + ".",
> "info", "example");
>
>    if(o.responseText !== undefined){
>        div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
>        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>        div.innerHTML += "<li>Status code message: " + o.statusText +
> "</li></ul>";
>    }
> }
>
> var callback =
> {
>  success:handleSuccess,
>  failure:handleFailure,
>  argument: { foo:"foo", bar:"bar" }
> };
>
> var sUrl = "YUITestAction.action";
>
>
>
>    function makeRequest(){
>    alert("test");
>
>    var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
>
>
>
> }
>    </script>
>
> *MY ACTION CLASS*
>
> public class YUITestAction extends ActionSupport{
>
>    /**
>     *
>     */
>    private static final long serialVersionUID = 1926031204500756104L;
>    ArrayList<String> list=new ArrayList<String>();
>    public String execute() throws Exception{
>        System.out.println("inside the execute method");
>
>        return SUCCESS;
>    }
>
>    public ArrayList<String> getList(){
>
>        list.add("test1");
>        list.add("test2");
>        list.add("aum");
>        list.add("arun");
>        list.add("mannu");
>        list.add("umesh");
>
>        return list;
>    }
> }
>
> any help in this regard is much appricaited
>
> --shekher
>

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


Re: Struts2+YUI

Posted by Adam Lister <al...@MIT.EDU>.
I am not a YUI guy, but I'm assuming YUI is expecting a javascript array 
of string. What does your struts.xml look like?  What have you defined 
for the SUCCESS result?  Is it a jsp?  If it is a jsp, you should make 
the jsp write out the array as YUI is expecting it.  The jsp will have 
access to what is in your action via the standard struts tags. Another 
option is to use a stream result and stream the javascript fragment 
directly from the action class.  Ultimately your action must probably 
produce something like ["foo", "bar", "whatever"] as it's response.  You 
can test this by first hitting the action directly with your browser.

aum strut wrote:
> HI All,
>
> DO any one have any clue about this probelm.......???
>
> i am really stuck here.....
>
> On Thu, Oct 16, 2008 at 3:33 PM, shekher awasthi
> <sh...@gmail.com>wrote:
>
>   
>> Hi All,
>>
>> I am trying to integrate struts2 with YUI ,but facing some problems with
>> this. I want that when my action get called by YUI it must return a
>> arrayList of string which i must be able to handle using the YUI.
>>
>> For this i took the help of example from YUI site and able to hit the
>> action
>> but my problem is that how can i get the access to the arraylist which my
>> action is populating when its execute methos is called .below i m pasting
>> the code from my action calss as well as the YUI code.
>> Plaese let me know how can i get this arraylist in my YUI code
>> *
>> YUI CODE*
>>
>> <div id="container"></div>
>> <script type="text/javascript" language="javascript">
>>
>>    var div = document.getElementById('container');
>>
>>    var handleSuccess = function(o){
>>    alert("pass");
>>
>>
>>    if(o.responseText !== undefined){
>>        alert("test11");
>>
>>        div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
>>        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>>        div.innerHTML += "<li>Status code message: " + o.statusText +
>> "</li>";
>>        div.innerHTML += "<li>HTTP headers: <ul>" + o.getAllResponseHeaders
>> + "</ul></li>";
>>        div.innerHTML += "<li>Server response: " + o.getList().toString +
>> "</li>";
>>        div.innerHTML += "<li>Argument object: Object ( [foo] => " +
>> o.argument.foo +
>>                         " [bar] => " + o.argument.bar +" )</li>";
>>    }
>>
>>
>> }
>>
>> var handleFailure = function(o){
>>        alert("fail");
>>        YAHOO.log("The failure handler was called.  tId: " + o.tId + ".",
>> "info", "example");
>>
>>    if(o.responseText !== undefined){
>>        div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
>>        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>>        div.innerHTML += "<li>Status code message: " + o.statusText +
>> "</li></ul>";
>>    }
>> }
>>
>> var callback =
>> {
>>  success:handleSuccess,
>>  failure:handleFailure,
>>  argument: { foo:"foo", bar:"bar" }
>> };
>>
>> var sUrl = "YUITestAction.action";
>>
>>
>>
>>    function makeRequest(){
>>    alert("test");
>>
>>    var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
>>
>>
>>
>> }
>>    </script>
>>
>> *MY ACTION CLASS*
>>
>> public class YUITestAction extends ActionSupport{
>>
>>    /**
>>     *
>>     */
>>    private static final long serialVersionUID = 1926031204500756104L;
>>    ArrayList<String> list=new ArrayList<String>();
>>    public String execute() throws Exception{
>>        System.out.println("inside the execute method");
>>
>>        return SUCCESS;
>>    }
>>
>>    public ArrayList<String> getList(){
>>
>>        list.add("test1");
>>        list.add("test2");
>>        list.add("aum");
>>        list.add("arun");
>>        list.add("mannu");
>>        list.add("umesh");
>>
>>        return list;
>>    }
>> }
>>
>> any help in this regard is much appricaited
>>
>> --shekher
>>
>>     
>
>   

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


Re: Struts2+YUI

Posted by aum strut <au...@gmail.com>.
HI All,

DO any one have any clue about this probelm.......???

i am really stuck here.....

On Thu, Oct 16, 2008 at 3:33 PM, shekher awasthi
<sh...@gmail.com>wrote:

> Hi All,
>
> I am trying to integrate struts2 with YUI ,but facing some problems with
> this. I want that when my action get called by YUI it must return a
> arrayList of string which i must be able to handle using the YUI.
>
> For this i took the help of example from YUI site and able to hit the
> action
> but my problem is that how can i get the access to the arraylist which my
> action is populating when its execute methos is called .below i m pasting
> the code from my action calss as well as the YUI code.
> Plaese let me know how can i get this arraylist in my YUI code
> *
> YUI CODE*
>
> <div id="container"></div>
> <script type="text/javascript" language="javascript">
>
>    var div = document.getElementById('container');
>
>    var handleSuccess = function(o){
>    alert("pass");
>
>
>    if(o.responseText !== undefined){
>        alert("test11");
>
>        div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
>        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>        div.innerHTML += "<li>Status code message: " + o.statusText +
> "</li>";
>        div.innerHTML += "<li>HTTP headers: <ul>" + o.getAllResponseHeaders
> + "</ul></li>";
>        div.innerHTML += "<li>Server response: " + o.getList().toString +
> "</li>";
>        div.innerHTML += "<li>Argument object: Object ( [foo] => " +
> o.argument.foo +
>                         " [bar] => " + o.argument.bar +" )</li>";
>    }
>
>
> }
>
> var handleFailure = function(o){
>        alert("fail");
>        YAHOO.log("The failure handler was called.  tId: " + o.tId + ".",
> "info", "example");
>
>    if(o.responseText !== undefined){
>        div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
>        div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
>        div.innerHTML += "<li>Status code message: " + o.statusText +
> "</li></ul>";
>    }
> }
>
> var callback =
> {
>  success:handleSuccess,
>  failure:handleFailure,
>  argument: { foo:"foo", bar:"bar" }
> };
>
> var sUrl = "YUITestAction.action";
>
>
>
>    function makeRequest(){
>    alert("test");
>
>    var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
>
>
>
> }
>    </script>
>
> *MY ACTION CLASS*
>
> public class YUITestAction extends ActionSupport{
>
>    /**
>     *
>     */
>    private static final long serialVersionUID = 1926031204500756104L;
>    ArrayList<String> list=new ArrayList<String>();
>    public String execute() throws Exception{
>        System.out.println("inside the execute method");
>
>        return SUCCESS;
>    }
>
>    public ArrayList<String> getList(){
>
>        list.add("test1");
>        list.add("test2");
>        list.add("aum");
>        list.add("arun");
>        list.add("mannu");
>        list.add("umesh");
>
>        return list;
>    }
> }
>
> any help in this regard is much appricaited
>
> --shekher
>