Hi Scott, there is no example that covers everything you mentioned, but you might want to take a look at the Github demo [1] and some code snippets mentioned below.
Content type and accept headers of the request can be configured with rest.Resource#configureRequest. The content type of the response is determined by the server. The Location header is part of the response headers, but qooxdoo does not expose this header in any special way (yet). We are planning s to implement some kind of support for HATEOAS (think of it as auto-discovery for REST services), but for now you'll need to handle the Location header yourself. By scrollable table, do you mean a virtual data-bound table? Note that the virtual table as of qooxdoo 1.6 does not use the (new) virtual infrastructure. Concerning date handling, you can draw some inspiration from the conversion mechanism implemented in remote.Rpc [2, 3]. The basic idea is to provide a replacer and reviver to JSON.stringify and JSON.parse respectively. For now, I assume you will need to handle json to date conversion (reviver) in your success listeners and date to json conversion (replacer) when assembling the requests payload. Its a little complicated so please feel free to open an enhancement bug. Hope this is of any help. Regards Tristan [1] http://demo.qooxdoo.org/current/demobrowser/#data~Github.html [2] http://bit.ly/sIsaTr [3] http://bit.ly/rNQTWk Am 15.12.2011 um 23:29 schrieb Scott Chapman: > I'd like to have a REST resource that handles JSON both for sending and > receiving, with the correct Content-Type and Accept headers coming and going. > > POSTing to the REST url should get back the Location header for the new item > as well. > > Further, I'd like to plug in a custom datetime json encoder/decoder so that > values coming in as strings that match the ISO format for a date are > converted to JavaScript Date objects and dates/datetimes are converted to > strings in a known format so that they can be turned back to dates/datetimes > on the server. > > I'd like to be able to bind this to a scrollable table on the client side > (read-only for now, editable up the road). > > I don't see an example that encapsulates all or most of this functionality so > far. > > Can anyone point me to relevant example(s)? > > Many thanks! > Scott > > > > > The content of this email does not necessarily represent the views/opinions > of my employer, Masco Corporation. If you are not the intended recipient of > this email, please let me know since that means it got to you in error. > Please delete it from your computer system since it may contain privileged or > confidential information intended for someone else. > > Masco does its best to eliminate viruses and other malicious software in > emails and attachments coming through its servers and so cannot be held > responsible if malicious software is inadvertently imbedded in this > communication. > ------------------------------------------------------------------------------ > 10 Tips for Better Server Consolidation > Server virtualization is being driven by many needs. > But none more important than the need to reduce IT complexity > while improving strategic productivity. Learn More! > http://www.accelacomm.com/jaw/sdnl/114/51507609/_______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
