Package org.apache.cocoon.portal.event.impl

Examples of org.apache.cocoon.portal.event.impl.ChangeAspectDataEvent


        String requestParameterName = this.labelManager.getRequestParameterName();

        if (event instanceof ChangeAspectDataEvent &&
            ((ChangeAspectDataEvent) event).getTarget() instanceof CompositeLayout) {

            ChangeAspectDataEvent e = (ChangeAspectDataEvent)event;
            CompositeLayout layout = (CompositeLayout)e.getTarget();
            int i = ((Integer)e.getData()).intValue();

            Item item = layout.getItem(i);
            if (item instanceof NamedItem) {
                StringBuffer key = new StringBuffer("");
                getKey(item, key);
View Full Code Here


     */
    protected void publish(Publisher publisher,
                             Layout layout,
                             String[] values) {
        if (layout instanceof FrameLayout) {
            final Event e = new ChangeAspectDataEvent(layout, "frame", values[2]);
            publisher.publish(e);
        } else {
            this.getLogger().warn(
                "the configured layout: "
                    + layout.getName()
View Full Code Here

    protected void publish(Publisher publisher,
                             Layout layout,
                              String[] values) {
        if (layout instanceof LinkLayout) {
            LinkLayout linkLayout = (LinkLayout) layout;
            Event e = new ChangeAspectDataEvent(linkLayout,
                                                "link-layout-key",
                                                values[2]);
            publisher.publish(e);
            e = new ChangeAspectDataEvent(linkLayout,
                                          "link-layout-id",
                                          values[3]);
            publisher.publish(e);
        } else {
            this.getLogger().warn(
View Full Code Here

            Event event = (Event)iter.next();

            if (event instanceof ChangeAspectDataEvent &&
                ((ChangeAspectDataEvent) event).getTarget() instanceof CompositeLayout) {

                ChangeAspectDataEvent e = (ChangeAspectDataEvent) event;
                CompositeLayout layout = (CompositeLayout) e.getTarget();
                int i = ((Integer) e.getData()).intValue();

                Item item = layout.getItem(i);
                if (value.length() > 0) {
                    value.append('.');
                }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.portal.event.Subscriber#inform(org.apache.cocoon.portal.event.Event)
     */
    public void inform(Event e) {
        final ChangeAspectDataEvent event = (ChangeAspectDataEvent)e;
        final Aspectalizable target = event.getAspectalizable();
        target.setAspectData(event.getAspectName(), event.getData());
    }
View Full Code Here

            int selected = data.intValue();
           
            // loop over all tabs
            for (int j = 0; j < tabLayout.getSize(); j++) {
                Item tab = tabLayout.getItem(j);
                ChangeAspectDataEvent event = null;

                // open named-item tag
                attributes.clear();
                if ( tab instanceof NamedItem ) {
                    attributes.addCDATAAttribute("name", String.valueOf(((NamedItem)tab).getName()));
                }
                if (j == selected) {
                    attributes.addCDATAAttribute("selected", "true");
                }
                event = new ChangeAspectDataEvent(tabLayout, config.aspectName, new Integer(j));
                attributes.addCDATAAttribute("parameter", service.getComponentManager().getLinkService().getLinkURI(event));

                // add parameters
                final Iterator iter = tab.getParameters().entrySet().iterator();
                while ( iter.hasNext() ) {
View Full Code Here

                        XMLUtils.startElement(handler, config.childTagName);
                        subNav = true;
                    }
                    attributes.addCDATAAttribute("name",
                        String.valueOf(((NamedItem) tab).getName()));
                    ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout,
                        config.aspectName, new Integer(j));
                    List events = new ArrayList(parentEvents);
                    events.add(event);

                    attributes.addCDATAAttribute("parameter",
View Full Code Here

   
    public void setAspectData(Aspectalizable owner, String aspectName, Object data) {
        super.setAspectData(owner, aspectName, data);

        // create persistence
        ChangeAspectDataEvent e;
        if ( owner instanceof CopletInstanceData) {
            e = new ChangeCopletInstanceAspectDataEvent((CopletInstanceData)owner, aspectName, data);
        } else {
            e = new ChangeAspectDataEvent( owner, aspectName, data );
        }
        if ( this.requestParameterName != null ) {
            e.setRequestParameterName( this.requestParameterName );
        }
        LinkService service = null;
        try {
            service = (LinkService)this.manager.lookup(LinkService.ROLE);
            service.addEventToLink( e );
View Full Code Here

                    attributes.addCDATAAttribute("name", String.valueOf(((NamedItem)tab).getName()));
                }
                if (j == selected) {
                    attributes.addCDATAAttribute("selected", "true");
                } else {
                    ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout, config.aspectName, new Integer(j));
                    attributes.addCDATAAttribute("parameter", service.getComponentManager().getLinkService().getLinkURI(event));
                }
                // add parameters
                final Iterator iter = tab.getParameters().entrySet().iterator();
                while ( iter.hasNext() ) {
View Full Code Here

     */
    protected void publish(Publisher publisher,
                             Layout layout,
                             String[] values) {
        if (layout instanceof FrameLayout) {
            final Event e = new ChangeAspectDataEvent(layout, "frame", values[2]);
            publisher.publish(e);
        } else {
            this.getLogger().warn(
                "the configured layout: "
                    + layout.getName()
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.event.impl.ChangeAspectDataEvent

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.