Package org.apache.tapestry

Examples of org.apache.tapestry.IComponent


    protected void generateParentAttributes(IMarkupWriter writer, IRequestCycle cycle)
    {
        String attribute;

        IComponent objParent = getContainer();
        if (objParent == null)
            return;

        IComponentSpecification specification = objParent.getSpecification();
        Map bindings = objParent.getBindings();
        if (bindings == null)
            return;

        Iterator i = bindings.entrySet().iterator();
View Full Code Here


    public void testServiceNotDirect() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IComponent c = newComponent();
        Location l = newLocation();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
        trainGetParameter(cycle, ServiceConstants.CONTAINER, null);
        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");
View Full Code Here

                        .getSpecification();
                INamespace componentNamespace = _componentResolver.getNamespace();

                // Instantiate the contained component.

                IComponent component = instantiateComponent(
                        page,
                        container,
                        id,
                        componentSpecification,
                        _componentResolver.getType(),
View Full Code Here

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

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

        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

    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

     */

    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

     * {@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

    {
        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

        cycle.activate(page);

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

        IComponent component = componentPage.getNestedComponent(componentId);

        IDirectEvent direct = null;

        try
        {
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IComponent

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.