}
} else if ( nodeType == IUserLayoutNodeDescription.FOLDER && (value = req.getParameter("fragmentPublishID")) != null ) {
String contentPublishId = value.trim();
String fragmentRootId = CommonUtils.nvl(req.getParameter("fragmentRootID"));
if ( contentPublishId.length() > 0 && fragmentRootId.length() > 0 ) {
IALFolderDescription folderDesc = (IALFolderDescription) nodeDesc;
folderDesc.setFragmentId(contentPublishId);
folderDesc.setFragmentNodeId(fragmentRootId);
}
//themePrefs.putParameterValue("uP_fragmentPublishID",contentPublishId);
}
newNodeDescription = nodeDesc;
ulm.markAddTargets(newNodeDescription);
} else {
ulm.markAddTargets(null);
}
if ((values = req.getParameterValues("uP_add_target")) != null) {
String[] values1, values2;
String value = null;
values1 = req.getParameterValues("targetNextID");
if ( values1 != null && values1.length > 0 )
value = values1[0];
if ( (values2 = req.getParameterValues("targetParentID")) != null ) {
if ( newNodeDescription != null ) {
if ( CommonUtils.nvl(value).trim().length() == 0 )
value = null;
// Adding a new node
newNodeId = ulm.addNode(newNodeDescription,values2[0],value).getId();
// if the new node is a fragment being added - we need to re-load the layout
if ( newNodeDescription instanceof IALFolderDescription ) {
IALFolderDescription folderDesc = (IALFolderDescription) newNodeDescription;
if ( folderDesc.getFragmentNodeId() != null ) {
ulm.saveUserLayout();
ulm.loadUserLayout();
}
}