private XObject[] loadFolder(XStaticFolder xFolder, AuthUser user) {
FolderService folderService = ServiceProvider.getFolderService(user);
//ExplorerTreeNode folder = folderService.getTreeNode(xFolder.getId());
// ExplorerTreeNode root = folderService.getTreeRoot();
// ExplorerTreeNode folder = find(root, xFolder.getId());
ExplorerTreeNode root = null;
try {
root = FolderModel.getInstance().load(user);
} catch (PaloIOException e) {
e.printStackTrace();
}
if (root == null) {
return new XObject[0];
}
ExplorerTreeNode folder = find(root, xFolder.getId());
ExplorerTreeNode[] children = folder.getChildren();
XObject[] xChildren = new XObject[children.length];
// ArrayList <XObjectWrapper> folders = new ArrayList<XObjectWrapper>();
// ArrayList <XObjectWrapper> elements = new ArrayList<XObjectWrapper>();
for (int i = 0; i < children.length; ++i) {
ExplorerTreeNode child = children[i];
if (child instanceof StaticFolder) {
StaticFolder staticFolder = (StaticFolder) child;
XStaticFolder xStaticFolder = new XStaticFolder(staticFolder
.getId(), staticFolder.getName());
xStaticFolder