[Building Sakai] EntityBroker problem: updateEntity won't work

Dunstall, Christopher cdunstall at csu.edu.au
Wed Apr 21 22:27:12 PDT 2010


Hi all,

I'm hoping an EntityBroker guru can help me out.

I'm attempting to save, via a POST an object through EntityBroker that has nested objects inside it.

For instance, consider the following json:

{
                "autotextId": 0,
                "canBeNull": "N",
                "children": [
                {
                                "autotextId": 0,
                                "canBeNull": "N",
                                "children": [],
                                "displayHeader": "N",
                                "editable": "Y",
                                "formatType": "Rich Text",
                                "helpText": "Blah",
                                "outlineSpecific": "N",
                                "parentId": 274,
                                "parentSectionId": 274,
                                "requiresQa": "Y",
                                "sectionId": 275,
                                "sectionSectionId": 281,
                                "sectionSeqNumber": 1,
                                "sectionSourceUrl": null,
                                "templateId": 101
                }
                ],
                "displayHeader": "Y",
                "editable": "N",
                "formatType": "Text",
                "helpText": null,
                "outlineSpecific": "N",
                "parentId": 200,
                "parentSectionId": 200,
                "requiresQa": "N",
                "sectionId": 274,
                "sectionSectionId": 280,
                "sectionSeqNumber": 8,
                "sectionSourceUrl": "Header",
                "templateId": 101
}

This is a 'template' object, but it also has child 'template' objects.

My updateEntity method is called but when I debug the entity that is passed to the method, it's got the data from the database (obtained from calling getEntity) and not the data I submitted in the post.

I have double checked my java object and the entity broker entity class and all members are read/write. I'm confused as to how the update method works.

Can someone explain to me how the submitted object from the post makes it to my entitybroker class and cast some light on why it's not doing so?

Thanks,

Chris Dunstall | Service Support - Applications
Technology Integration/OLE Virtual Team
Division of Information Technology | Charles Sturt University | Bathurst, NSW

Ph: 02 63384818 | Fax: 02 63384181

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100422/434864b4/attachment.html 


More information about the sakai-dev mailing list