portal - how to create a navigation in GateIn programatically -
i created gatein portal application using gatein 3.2. need create navigation link in gatein portal application without changing navigation.xml file. means need create in pragmatically. gatein service class need call?. there sample code available that?
afaik version 3.3 gatein introduced navigationservice that's used manipulate navigation. example usage of navigationservice:
pomsessionmanager mgr = (pomsessionmanager) container.getcomponentinstanceoftype(pomsessionmanager.class); navigationserviceimpl service = new navigationserviceimpl(mgr); mgr.getpomservice().getmodel().getworkspace().addsite(objecttype.portal_site, "save_navigation"); navigationcontext nav = new navigationcontext(sitekey.portal("save_navigation"), new navigationstate(5)); service.savenavigation(nav);
for more details should take @ navigationservice & testcases in version 3.3 (or later). , in component/portal module.
Comments
Post a Comment