Hi Dan,
I have been working on a custom JQuery based client viewer implementation of the Restful Objects viewer. This is partly based on the work Adam Howard has done in his AROW implementation but adds specific use cases using Mustache templates. I have made good progress but I am now working with some more complex domain objects and run into some issues with the JSON Viewer (v0.2.0- incubating). These issues occur when attempting to persist a new object. 1. The objects have a number of properties that return derived values and hence only have a getter but the viewer is not catering for this scenario.. When attempting to persist a NullPointerException is raised. This is caused by an attempt to execute the clearPropety method on a null PropertyClearFacet. 2. There are also some properties that are annotated as optional, but again a NullPointerException is raised if any of those properties are omitted. This would seem to break the Restful intent to allow independent development of client and server since the client would need to be aware of and supply a value for every new property added to domain objects. 3. Finally a more complex issue and which may be related to an inappropriate strategy for a Restful implementation but one that worked well with the DnD and HTML viewers. I have a graph of nodes in the domain and the relationships between nodes are described by a LinkObject representing the node edges. A contributed action is invoked on a parent node and a transient instance of a new child node is returned. Hitherto a transient link object has also been created during this invoke which contains the parent node reference and other properties set according to context. A reference to the transient link object (annotated @NotPersisted, @Optional and @Hidden) is set in the new transient child node. The link object is subsequently persisted in the Persisted event method of the new child node during its persist operation. The issue arising in the Json Viewer is that the transient link object disappears from the adapterMaps between the initial method invoke and the persist invoke resulting in a 500 Internal Server error with the message "TOID : <hex value> and stack trace "causedBy:" value of null. Are you aware of any of the issues raised in 1 and 2 that are perhaps addressed in a later version or a bug report? Is the strategy as outlined in (3) appropriate for the Restful implementation, and perhaps you could elaborate on the session management for the Server deployment type. I have assumed that a session is created upon authentication, and that server side session state including adapterMaps would remain valid across multiple Http requests until a user logs out, or the session expires after some preconfigured duration of inactivity. Regards, Barry Woods
