Examples of PortletWindow


Examples of org.apache.pluto.om.window.PortletWindow

    public void logout(CopletInstanceData coplet) {
        super.logout(coplet);
        if ( this.portletContainer == null ) {
            return;
        }
        PortletWindow window = (PortletWindow)coplet.getAttribute("window");
        if ( window != null ) {
            coplet.removeAttribute("window");
            PortletDefinitionRegistry registry = (PortletDefinitionRegistry) environment.getContainerService(PortletDefinitionRegistry.class);
       
            PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
            ((PortletEntityListImpl)pae.getPortletEntityList()).remove(window.getPortletEntity());
        }
    }
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

        final CopletInstanceData copletInstanceData = ((CopletLayout)layout).getCopletInstanceData();

        if ( config.rootTag ) {
            XMLUtils.startElement(contenthandler, config.tagName);
        }
        final PortletWindow window = (PortletWindow)copletInstanceData.getAttribute("window");
        if ( window == null ) {
            // no portlet window, so use a default behaviour
            XMLUtils.createElement(contenthandler, "title", copletInstanceData.getCopletData().getTitle());
        } else {
            if ( ((PortletWindowImpl)window).getLayout() == null ) {
                ((PortletWindowImpl)window).setLayout((CopletLayout)layout);
            }
           
            String title = (String) copletInstanceData.getAttribute("dynamic-title");
            if ( title == null ) {
                final PortletDefinition def = window.getPortletEntity().getPortletDefinition();
                try {
                    title = def.getDisplayName(def.getLanguageSet().getDefaultLocale()).getDisplayName();
                } catch (Exception ignore)  {
                    title = copletInstanceData.getCopletData().getTitle();
                }
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

           
            PortalURL url = context.getPortalURL();
            if (url != null)
            {
                NavigationalState state = url.getNavigationalState();               
                PortletWindow actionWindow = state.getPortletWindowOfAction();
                if (actionWindow == null)
                {
                    Iterator windows = state.getWindowIdIterator();
                    while (windows.hasNext())
                    {
                        String windowId = (String)windows.next();
                        PortletMode mode = state.getMode(windowId);
                        WindowState wstate = state.getState(windowId);
                        if (wstate != null || mode != null)
                        {
                            String windowState = "";
                            if (wstate != null)
                                windowState = wstate.toString();
                           
                            String portletMode = "";
                            if (mode != null)
                                portletMode = mode.toString();
                           
                            Portlets portlets = ((JetspeedRunData)data).getProfile().getDocument().getPortlets();
                            traverse(portlets, windowId, windowState, portletMode, (JetspeedRunData)data);                           
                        }
                    }
                   
                }
                if (actionWindow != null)
                {
                    String windowId = actionWindow.getId().toString();
                    //String windowId = nav.getWindowIdFromKey(state[0]);
                    //System.out.println("got token = " + state[0]+ ", window id = " + windowId + ", action = " + state[1]);
                    Portlets portlets = ((JetspeedRunData)data).getProfile().getDocument().getPortlets();
                    //traverse(portlets, windowId, state[1], (JetspeedRunData)data);
                    String windowState = state.getState(actionWindow).toString();
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

       
        String pa = getPortletConfig().getInitParameter(PORTLET_APPLICATION_NAME, null);
        String pd = getPortletConfig().getInitParameter(PORTLET_DEFINITION_NAME, null);
        String registryKey = pa + "::" + pd;
       
        PortletWindow window = fusion.getPortletWindow(entityId, registryKey);
        if (window == null)
        {
            return super.buildActionList(rundata, portlet);
        }
        PortletMode mode2 = PortletMode.VIEW;
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

            entityId = instance.getAttribute(J2_ENTITY, "");
            String pa = getPortletConfig().getInitParameter(PORTLET_APPLICATION_NAME, null);
            String pd = getPortletConfig().getInitParameter(PORTLET_DEFINITION_NAME, null);
            String registryKey = pa + "::" + pd;
           
            PortletWindow window = getPortletWindow(entityId, registryKey);
            if (window == null)
            {
                String msg = "Could not find portlet definition in registry for " + registryKey + " and  entity " + entityId;
                log.error(msg);
                return new JetspeedClearElement("JSR 168 Portlet is not configured correctly, no content available. Registry Key [" + registryKey + "], entity [" + entityId + "]");               
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

        // return dispatch(data, entityId);
    }
   
    public PortletWindow getPortletWindow(String id, String registryKey)
    {
        PortletWindow window = windowAccessor.getPortletWindow(id);
        if (window == null)
        {
            PortletEntity entity = entityAccess.getPortletEntity(id);
            if (entity == null)
            {
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

        JetspeedRunData jrun = (JetspeedRunData)rundata;
        String entityId = null;
       
        PortletInstance instance = this.getInstance(jrun);
        entityId = instance.getAttribute(J2_ENTITY, "3");
        PortletWindow window = windowAccessor.getPortletWindow(entityId);
        if (window == null)
        {
            window = windowAccessor.createPortletWindow(entityId);
        }
        int mode = jrun.getMode();
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

        // if not, create one
        final Map objectModel = ContextHelper.getObjectModel(this.context);

        PortletURLProviderImpl event = (PortletURLProviderImpl) objectModel.get("portlet-event");
        if ( event != null ) {
            PortletWindow actionWindow = event.getPortletWindow();
            try {
                final ServletRequestImpl req = (ServletRequestImpl) objectModel.get("portlet-request");
                final ServletResponseImpl res= (ServletResponseImpl)objectModel.get("portlet-response");
                this.portletContainer.processPortletAction(actionWindow, req.getRequest(actionWindow), res);
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

        final CopletInstanceData copletInstanceData = ((CopletLayout)layout).getCopletInstanceData();

        if ( config.rootTag ) {
            XMLUtils.startElement(contenthandler, config.tagName);
        }
        final PortletWindow window = (PortletWindow)copletInstanceData.getAttribute("window");
        if ( window == null ) {
            // no portlet window, so use a default behaviour
            XMLUtils.createElement(contenthandler, "title", copletInstanceData.getCopletData().getTitle());
        } else {
            String title = (String) copletInstanceData.getAttribute("dynamic-title");
            if ( title == null ) {
                final PortletDefinition def = window.getPortletEntity().getPortletDefinition();
                try {
                    title = def.getDisplayName(def.getLanguageSet().getDefaultLocale()).getDisplayName();
                } catch (Exception ignore)  {
                    title = copletInstanceData.getCopletData().getTitle();
                }
View Full Code Here

Examples of org.apache.pluto.om.window.PortletWindow

        PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
        PortletEntity portletEntity = ((PortletEntityListImpl)pae.getPortletEntityList()).add(pae, portletEntityId, coplet, registry);
       
        if ( portletEntity.getPortletDefinition() != null ) {
            // create the window
            PortletWindow portletWindow = new PortletWindowImpl(portletEntityId);               
            ((PortletWindowCtrl)portletWindow).setId(coplet.getId());
            ((PortletWindowCtrl)portletWindow).setPortletEntity(portletEntity);
            PortletWindowList windowList = portletEntity.getPortletWindowList();       
            ((PortletWindowListCtrl)windowList).add(portletWindow);   
            coplet.setAttribute("window", portletWindow);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.