Hi Craig, On Tue, Apr 22, 2008 at 10:55 PM, Craig L. Ching <[EMAIL PROTECTED]> wrote: > ...1) Just about to go digging, but if someone could point me to the code > that gets the node properties and sends them via json to the browser, > I'd appreciate it....
The starting point would be the JsonRendererServlet, https://svn.apache.org/repos/asf/incubator/sling/trunk/sling/servlets-get/src/main/java/org/apache/sling/servlets/JsonRendererServlet.java > ... 2) It appears that the request URI to get the properties of a node is > [resource URI].json (more or less, there's a depth in there that I don't > quite understand yet). Is it safe to assume that users won't have > content at that URI?... Not sure what you mean, to get the json values (including properties) of the node at /foo you'd use /foo.json, or /foo.infinity.json for a recursive dump. If the node path is /foo.json you'll have to use /foo.json.json but usually I'd recommend not having extensions in node paths. The JsonRenderingTest class has more examples, https://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java > ... 3) Does anyone have any thoughts on how they'd like to see properties > vs. children (e.g. does everyone agree that the way the Eclipse browser > works is a good model for this? Or are there certain things that should > be done differently? I have to admit, I'm not real fond of the Eclipse > plugin's structure, but maybe I don't completely understand it either). > I'm sort of of the opinion that properties should not be in the tree, > the tree should only contain nodes and the properties should be in a > separate pane when a node is selected in the tree.... Agree with that, the left part of the screen could be the node selector (either a tree or a list of nodes or subtrees in the case of a search result), and the right part could show the property values, with (later) custom editors selected according to the property content. -Bertrand
