Examples of IComponent


Examples of org.apache.tapestry.IComponent

        IContainedComponent contained = new ContainedComponent();
        contained.setLocation(location);
        contained.setType(componentType);

        IComponent result = instantiateComponent(
                page,
                container,
                componentId,
                spec,
                _componentResolver.getType(),
View Full Code Here

Examples of org.apache.tapestry.IComponent

        ComponentConstructor cc = _componentConstructorFactory.getComponentConstructor(
                spec,
                className);

        IComponent result = (IComponent) cc.newInstance();

        result.setNamespace(namespace);
        result.setPage(page);
        result.setContainer(container);
        result.setId(id);
        result.setContainedComponent(containedComponent);
        result.setLocation(containedComponent.getLocation());

        _count++;

        return result;
    }
View Full Code Here

Examples of org.apache.tapestry.IComponent

    public void renderForComponent(IMarkupWriter writer, IRequestCycle cycle, IComponent invoker)
    {
        Defense.notNull(invoker, "invoker");

        IComponent oldInvoker = _invoker;

        try
        {
            _invoker = invoker;
            renderBody(writer, cycle);
View Full Code Here

Examples of org.apache.tapestry.IComponent

     */

    public void performCallback(IRequestCycle cycle)
    {
        IPage page = cycle.getPage(_pageName);
        IComponent component = page.getNestedComponent(_componentIdPath);
        IDirect direct = null;

        try
        {
            direct = (IDirect) component;
View Full Code Here

Examples of org.apache.tapestry.IComponent

     * {@link IComponent#renderBody(IMarkupWriter, IRequestCycle)} on it.
     */

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        IComponent container = getContainer();

        container.renderBody(writer, cycle);
    }
View Full Code Here

Examples of org.apache.tapestry.IComponent

    {
        Defense.isAssignable(parameter, DirectEventServiceParameter.class, "parameter");

        DirectEventServiceParameter dsp = (DirectEventServiceParameter) parameter;

        IComponent component = dsp.getDirect();

        // New since 1.0.1, we use the component to determine
        // the page, not the cycle. Through the use of tricky
        // things such as Block/InsertBlock, it is possible
        // that a component from a page different than
        // the response page will render.
        // In 1.0.6, we start to record *both* the render page
        // and the component page (if different).

        IPage activePage = _requestCycle.getPage();
        IPage componentPage = component.getPage();
       
        Map parameters = new HashMap();
       
        boolean stateful = _request.getSession(false) != null;
       
        parameters.put(ServiceConstants.PAGE, activePage.getPageName());
        parameters.put(ServiceConstants.COMPONENT, component.getIdPath());
        parameters.put(ServiceConstants.CONTAINER, componentPage == activePage ? null
                : componentPage.getPageName());
        parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
        if (dsp.getUpdateParts() != null && dsp.getUpdateParts().length > 0)
            parameters.put(ServiceConstants.UPDATE_PARTS, dsp.getUpdateParts());
View Full Code Here

Examples of org.apache.tapestry.IComponent

        cycle.activate(page);

        IPage componentPage = componentPageName == null ? page : cycle.getPage(componentPageName);

        IComponent component = componentPage.getNestedComponent(componentId);

        IDirectEvent direct = null;

        try
        {
View Full Code Here

Examples of org.apache.tapestry.IComponent

    /**
     * @see org.apache.tapestry.AbstractComponent#prepareForRender(org.apache.tapestry.IRequestCycle)
     */
    protected void prepareForRender(IRequestCycle cycle)
    {
        IComponent outer = (IComponent) cycle.getAttribute(ATTRIBUTE_NAME);

        if (outer != null)
            throw new ApplicationRuntimeException(FormMessages.linkSubmitMayNotNest(this, outer),
                    this, getLocation(), null);

View Full Code Here

Examples of org.apache.tapestry.IComponent

    private void applyChange(IPage page, PropertyChange change)
    {
        String idPath = change.getComponentPath();

        IComponent component = (idPath == null) ? page : page
                .getNestedComponent(idPath);

        PropertyUtils.write(component, change.getPropertyName(), change
                .getNewValue());
    }
View Full Code Here

Examples of org.apache.tapestry.IComponent

                .getNewValue());
    }

    public void observeChange(ObservedChangeEvent event)
    {
        IComponent component = event.getComponent();
        String propertyName = event.getPropertyName();

        if (_locked)
        {
            _log.error(RecordMessages.recorderLocked(propertyName, component),
                    null, null);
            return;
        }

        PropertyPersistenceStrategy strategy = findStrategy(component,
                propertyName);

        if (strategy != null)
            strategy.store(_pageName, component.getIdPath(), propertyName,
                    event.getNewValue());
    }
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.