Package org.exoplatform.applicationregistry.webui.component.UIPortletManagement

Examples of org.exoplatform.applicationregistry.webui.component.UIPortletManagement.PortletExtra


    public static class ShowCategoriesActionListener extends EventListener<UIPortletInfo> {

        @Override
        public void execute(Event<UIPortletInfo> event) throws Exception {
            UIPortletInfo uiPortletInfo = event.getSource();
            PortletExtra portlet = uiPortletInfo.getPortlet();
            uiPortletInfo.removeChild(UICategorySelector.class);
            UICategorySelector selector = uiPortletInfo.addChild(UICategorySelector.class, null, CATEGORY_ID);
            Application app = new Application();
            app.setApplicationName(portlet.getName());

            // I really hate the fact that the code to create Applications is spread all over and doesn't properly deal with
            // application types
            if (portlet.isRemote()) {
                app.setType(ApplicationType.WSRP_PORTLET);
            } else {
                app.setType(ApplicationType.PORTLET);
            }
            app.setDisplayName(portlet.getDisplayName());
            app.setContentId(portlet.getId());
            app.setAccessPermissions(new ArrayList<String>());

            selector.setApplication(app);
            selector.setRendered(true);
        }
View Full Code Here


     
      @Override
      public void execute(Event<UIPortletInfo> event) throws Exception
      {
         UIPortletInfo uiPortletInfo = event.getSource();
         PortletExtra portlet = uiPortletInfo.getPortlet();
         uiPortletInfo.removeChild(UICategorySelector.class);
         UICategorySelector selector = uiPortletInfo.addChild(UICategorySelector.class, null, CATEGORY_ID);
         Application app = new Application();
         app.setApplicationName(portlet.getName());
         app.setType(ApplicationType.PORTLET);
         app.setDisplayName(portlet.getDisplayName());
         app.setContentId(portlet.getId());
         app.setAccessPermissions(new ArrayList<String>());
        
         selector.setApplication(app);
         selector.setRendered(true);
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.applicationregistry.webui.component.UIPortletManagement.PortletExtra

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.