[Building Sakai] EntityBroker and posting JSON

Adrian Fish a.fish at lancaster.ac.uk
Fri Feb 5 02:47:10 PST 2010


Can you post  a json string to the EB direct handler and have it decoded 
into a POJO? Anybody know ? I was hoping to be able to post JSON to EB 
with code like this:

jQuery.ajax(
        {
            url : "/direct/bbb-meeting/new.json",
            dataType : "text",
            type : 'POST',
            data : jsonData,
            success : function(meeting)
            {
                switchState('currentMeetings');
            },
            error : function(xmlHttpRequest,status,error)
            {
                alert("Failed to create meeting. Reason: " + error);
            }
        });

... but am having no success. The entity in my createEntity method is 
uninitialised.

Any ideas? Anyone?

Thanks,

Adrian.

-- 
==================================
Adrian Fish
Software Engineer
Centre for e-Science
Bowland Tower South C Floor
Lancaster University
Lancaster
LA1 4YW
email: a.fish at lancaster.ac.uk

http://confluence.sakaiproject.org/display/YAFT/Yaft
http://confluence.sakaiproject.org/display/BLOG/Home
http://confluence.sakaiproject.org/display/AGORA/Home

-------------- next part --------------
A non-text attachment was scrubbed...
Name: a_fish.vcf
Type: text/x-vcard
Size: 289 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100205/a9055a7a/attachment.vcf 


More information about the sakai-dev mailing list