08-02-2007 10:51 AM
08-07-2007 11:17 AM
Map session = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
BrowseBean browseBean = (BrowseBean)session.get("BrowseBean");
UIRichList spacesRichList = browseBean.getSpacesRichList();
ArrayList <MapNode>arr = (ArrayList)spacesRichList.getValue();
if(arr != null)
{
for(MapNode node:arr)
{
Long currentIndex = (Long)node.get("{custom.model}Index");
if(currentIndex == index-1)
{
node.put("{custom.model}Index", index);
}
if(currentIndex == index)
{
node.put("{custom.model}Index", index-1);
}
}
spacesRichList.setValue(arr);
}
this solved the rendering problem, but the model is not saved this way….. (i can't understand why :shock: )List<ChildAssociationRef> list = nodeService.getParentAssocs( ref);
ChildAssociationRef parent = list.get( 0);
List<ChildAssociationRef> childRefs = nodeService.getChildAssocs(parent.getParentRef(),
ContentModel.ASSOC_CONTAINS,
RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef childAssRef : childRefs)
{
if ((Long)nodeService.getProperty( childAssRef.getChildRef(), qualifiefName) == index - 1)
{
nodeService.setProperty(childAssRef.getChildRef(), qualifiefName, index);
break;
}
}
nodeService.setProperty( ref, qualifiefName, –index);
08-09-2007 07:09 AM
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
08-12-2007 11:10 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.