List<UIComponent> children = uiPortal.getChildren();
if (children == null)
return model;
ArrayList<ModelObject> newChildren = new ArrayList<ModelObject>();
for (UIComponent child : children) {
ModelObject component = buildModelObject(child);
if (component != null)
newChildren.add(component);
}
model.getPortalLayout().setChildren(newChildren);
model.getPortalLayout().setMoveAppsPermissions(uiPortal.getMoveAppsPermissions());