The RO spec is also mentioning ETags. Could that be a temporary workaround
for this problem? I could keep a list of all domain objects present in the
browser, and GET all of them after each action.

Johan.

On Tue, Nov 1, 2011 at 11:21 AM, Dan Haywood
<[email protected]>wrote:

> On 1 November 2011 10:10, Johan Andries <[email protected]> wrote:
>
> > Hi,
> >
> > if I do an object action using the json-viewer, is there a way to get a
> > list of all the the objects whose state has been changed as a side-effect
> > of that action?
>
>
> Good question.  The short answer is no, not currently.  But it could...
>
>
>
>
> > That way the impacted object views can be updated in the
> > javascript application.
>
>
>
> > Is this kind of system used in the DnD
> > implementation?
>
> Yes... more generally, there is an ObjectNotifier component that keeps
> track of dirtied objects, and this can be used to notify the viewers to
> repaint themselves.
>
> So the information is there.  But we need to figure out how to return it.
>
> The obvious thing to do is to add a custom extension, eg:
>
> "extensions": {
>  "changedObjects": [
>     { "rel": "domainObject", "href": "
> http://localhost:8080/objects/OID-123";
> ...},
>     { "rel": "domainObject", "href": "
> http://localhost:8080/objects/OID-456";
> ...},
>  ]
> }
>
> However, one snag is that, in the case of an action returning a single
> domain object, the RO spec says to return the domain object itself, rather
> than a representation of an action result that references the domain
> object.  My gut feeling is that, if we were to use extensions as I describe
> above, then it would be wrong to put that "changedObjects" list on the
> domain object's representation; they really belong to the results of the
> action.
>
> Thus, I'm thinking we would need to change to the RO spec, so that an
> action always returns its own representation.  (Indeed, even a void action
> should return a representation, now that I think of it... to indicate any
> changed objects).
>
> Richard... what's your view?
>
>
> Dan
>
>
>
>
>
> > Any hints?
> >
> > Thank you!
> >
> > Johan.
> >
>

Reply via email to