{
String[] pageChunks = split("::", reference);
ObjectType<? extends Site> siteType = Mapper.parseSiteType(pageChunks[0]);
Site site = workspace.getSite(siteType, pageChunks[1]);
org.gatein.mop.api.workspace.Page target = site.getRootPage().getChild("pages").getChild(pageChunks[2]);
PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
link.setPage(target);
}
else
{
PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
link.setPage(null);
}
//
Described described = sourceNav.adapt(Described.class);
described.setName(state.getLabel());