Package org.apache.cocoon.portal.layout

Examples of org.apache.cocoon.portal.layout.NamedItem


            Integer data = (Integer) layout.getAspectData(config.aspectName);
            int selected = data.intValue();
           
            // loop over all tabs
            for (int j = 0; j < tabLayout.getSize(); j++) {
                NamedItem tab = (NamedItem) tabLayout.getItem(j);

                // open named-item tag
                attributes.clear();
                attributes.addCDATAAttribute("name", String.valueOf(tab.getName()));
                if (j == selected) {
                    attributes.addCDATAAttribute("selected", "true");
                } else {
                    ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout, "tab", new Integer(j));
                    attributes.addCDATAAttribute("parameter", service.getComponentManager().getLinkService().getLinkURI(event));
                }
                XMLUtils.startElement(handler, "named-item", attributes);
                if (j == selected) {
                    this.processLayout(tab.getLayout(), service, handler);
                }
                // close named-item tag
                XMLUtils.endElement(handler, "named-item");
            }
View Full Code Here


            CopletInstanceData newCoplet = cfac.newInstance(copletData);

            copletLayout.setCopletInstanceData(newCoplet);
            profileManager.register(copletLayout);

            NamedItem newItem = new NamedItem();
            newItem.setLayout(copletLayout);

            CompositeLayout tabLayout =
                (CompositeLayout) profileManager.getPortalLayout(
                    "portalApplications", null);

            newItem.setName(getNewInstanceTabName(tabLayout));
            tabLayout.addItem(newItem);
        } catch (ServiceException ce) {
            throw new ProcessingException(
                "Unable to lookup profile manager.",
                ce);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.layout.NamedItem

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.