@Override public PortletArchive createFacesPortlet(String name, String title) { PortletDescriptor desc = getOrCreatePortletDescriptor() .createPortlet() .portletName(name) .portletClass(GENERIC_FACES_PORTLET_CLASS) .createInitParam() .name(DEFAULT_VIEW_ID_PARAM_NAME) .value("/index.xhtml") .up() .createSupports() .mimeType("text/html") .portletMode(PortletMode.VIEW.toString()) .up() .getOrCreatePortletInfo() .title(title) .up() .up(); this.setPortletXML(new StringAsset(desc.exportAsString())); return covarientReturn(); }
@Override public PortletArchive createFacesPortlet(String name, String title, String viewModeViewId) { viewModeViewId = checkForLeadingSlash(viewModeViewId); PortletDescriptor desc = getOrCreatePortletDescriptor() .createPortlet() .portletName(name) .portletClass(GENERIC_FACES_PORTLET_CLASS) .createInitParam() .name(DEFAULT_VIEW_ID_PARAM_NAME) .value(viewModeViewId) .up() .createSupports() .mimeType("text/html") .portletMode(PortletMode.VIEW.toString()) .up() .getOrCreatePortletInfo() .title(title) .up() .up(); this.setPortletXML(new StringAsset(desc.exportAsString())); return covarientReturn(); }
@Override public PortletArchive createFacesPortlet(String name) { PortletDescriptor desc = getOrCreatePortletDescriptor() .createPortlet() .portletName(name) .portletClass(GENERIC_FACES_PORTLET_CLASS) .createInitParam() .name(DEFAULT_VIEW_ID_PARAM_NAME) .value("/index.xhtml") .up() .createSupports() .mimeType("text/html") .portletMode(PortletMode.VIEW.toString()) .up() .getOrCreatePortletInfo() .title(name) .up() .up(); this.setPortletXML(new StringAsset(desc.exportAsString())); return covarientReturn(); }
@Override public PortletArchive createFacesPortlet(String name, String title, String viewModeViewId, String editModeViewId) { viewModeViewId = checkForLeadingSlash(viewModeViewId); editModeViewId = checkForLeadingSlash(editModeViewId); PortletDescriptor desc = getOrCreatePortletDescriptor() .createPortlet() .portletName(name) .portletClass(GENERIC_FACES_PORTLET_CLASS) .createInitParam() .name(DEFAULT_VIEW_ID_PARAM_NAME) .value(viewModeViewId) .up() .createInitParam() .name(DEFAULT_EDIT_ID_PARAM_NAME) .value(editModeViewId) .up() .createSupports() .mimeType("text/html") .portletMode(PortletMode.VIEW.toString()) .portletMode(PortletMode.EDIT.toString()) .up() .getOrCreatePortletInfo() .title(title) .up() .up(); this.setPortletXML(new StringAsset(desc.exportAsString())); return covarientReturn(); }
.createInitParam() .name(DEFAULT_VIEW_ID_PARAM_NAME) .value(viewModeViewId) .up() .createInitParam()