Пример #1
0
    public void onResponseReceived(Request request, Response response) {
      if (200 == response.getStatusCode()) {
        grid.removeAllRowsInGrids();
        addProperties(response);

      } else {
        GWT.log(
            "ResourceGrids - Couldn't retrieve JSON for request - status code  :"
                + response.getStatusCode()
                + " -  "
                + response.getText(),
            null);
      }
    }
Пример #2
0
 public void populate() {
   root = new TreeItem(constants.rootItemDescription());
   //		try {
   //
   //            SessionInfo info = (SessionInfo)
   // this.getClass().getClassLoader().loadClass("org.apache.sling.explorer.client.sling.SessionInfo").newInstance();
   //
   //            root = new TreeItem(info.getUser());
   //        }
   //        catch(Exception ex) {
   //            return;
   //        }
   addItem(root);
   this.loadChildren(
       root,
       URL.encode(ExplorerConstants.CONTENT_ROOT + ExplorerConstants.JSON_TREE_REQUEST_EXTENSION));
   if (properties != null) {
     properties.populate(ExplorerConstants.CONTENT_ROOT);
   }
 }