struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ravindra" <ravin...@btpsoft.com>
Subject RE: Getting acknowledgment for an AJAX request
Date Thu, 25 Sep 2008 06:03:30 GMT

You can process the json response using yui plugins.There is a module called
ConnectionManager in yui using that you can invoke your json action class as
shown below 

var mySource = new DataSource('some/some/example.action?');

below is yui link.

http://developer.yahoo.com/yui

YAHOO.util.Event.onDOMReady(function () {
    var DataSource = YAHOO.util.DataSource,
        DataTable  = YAHOO.widget.DataTable,
        Paginator  = YAHOO.widget.Paginator;

    var mySource = new DataSource('some/some/example.action?');
    mySource.responseType   = DataSource.TYPE_JSON;
    mySource.responseSchema = {
        resultsList : 'records',
        fields      : ['id','userName','status'],
        metaFields : {
            totalRecords: 'totalRecords' // The totalRecords meta field is
                                         // a "magic" meta, and will be
passed
                                         // to the Paginator.
        }
    };

-----Original Message-----
From: ManiKanta G [mailto:go4mani@gmail.com] 
Sent: Thursday, September 25, 2008 10:17 AM
To: Struts Users Mailing List
Subject: Re: Getting acknowledgment for an AJAX request

> As I said, the JSON plugin would be a good starting point.
>
>  http://cwiki.apache.org/S2PLUGINS/json-plugin.html


Thanks. I've experimented with the JSON and I m able to return a JSON
string, but was not able to process that in the jsp.

How I m going to process the JSON in jsp? Do I need to write javascript for
it?

Regards,
ManiKanta



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


Mime
View raw message