Examples of IComponent


Examples of org.apache.tapestry.IComponent

     *
     **/

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

        if (_locked)
            throw new ApplicationRuntimeException(
                Tapestry.format(
                    "PageRecorder.change-after-lock",
                    component.getPage().getPageName(),
                    propertyName,
                    component.getExtendedId()));

        if (propertyName == null)
            throw new ApplicationRuntimeException(
                Tapestry.format("PageRecorder.null-property-name", component.getExtendedId()));

        Object activeValue = event.getNewValue();

        try
        {
            recordChange(component.getIdPath(), propertyName, activeValue);
        }
        catch (Throwable t)
        {
            t.printStackTrace();
            throw new ApplicationRuntimeException(
                Tapestry.format(
                    "PageRecorder.unable-to-persist",
                    propertyName,
                    component.getExtendedId(),
                    activeValue),
                t);
        }
    }
View Full Code Here

Examples of org.apache.tapestry.IComponent

        {
            PageChange change = (PageChange) i.next();

            String propertyName = change.getPropertyName();

            IComponent component = page.getNestedComponent(change.getComponentPath());

            Object storedValue = change.getNewValue();

            try
            {
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;
        }
        catch (ClassCastException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("DirectCallback.wrong-type", component.getExtendedId()),
                component,
                null,
                ex);
        }

View Full Code Here

Examples of org.apache.tapestry.IComponent

     *  
     *  @param objSettingsContainer the component from which to get the settings
     */
    public void loadSettings(IComponent objSettingsContainer)
    {
        IComponent objColumnRendererSource = (IComponent) objSettingsContainer.getComponents().get(getColumnName() + COLUMN_RENDERER_BLOCK_SUFFIX);
        if (objColumnRendererSource != null && objColumnRendererSource instanceof Block)
            setColumnRendererSource(new BlockTableRendererSource((Block) objColumnRendererSource));

        IComponent objValueRendererSource = (IComponent) objSettingsContainer.getComponents().get(getColumnName() + VALUE_RENDERER_BLOCK_SUFFIX);
        if (objValueRendererSource != null && objValueRendererSource instanceof Block)
            setValueRendererSource(new BlockTableRendererSource((Block) objValueRendererSource));
    }
View Full Code Here

Examples of org.apache.tapestry.IComponent

        if (Tapestry.size(components) == 0)
            return;

        for (Iterator it = components.iterator(); it.hasNext();)
        {
            IComponent embedded = (IComponent) it.next();
            walkComponentTree(embedded);
        }
    }
View Full Code Here

Examples of org.apache.tapestry.IComponent

        if (complex)
            componentPage = cycle.getPage(componentPageName);
        else
            componentPage = page;

        IComponent component = componentPage.getNestedComponent(componentPath);

        try
        {
            direct = (IDirect) component;
        }
        catch (ClassCastException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("DirectService.component-wrong-type", component.getExtendedId()),
                component,
                null,
                ex);
        }
View Full Code Here

Examples of org.apache.tapestry.IComponent

    // Setup the page for the rewind, then do the rewind.

    cycle.activate(page);
   
        IPage componentPage = cycle.getPage(componentPageName);
        IComponent component = componentPage.getNestedComponent(targetIdPath);

        try
        {
            action = (IAction) component;
        }
        catch (ClassCastException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("ActionService.component-wrong-type", component.getExtendedId()),
                component,
                null,
                ex);
        }
View Full Code Here

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

Examples of org.apache.tapestry.IComponent

    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

Examples of org.apache.tapestry.IComponent

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

                // Instantiate the contained component.

                IComponent component = instantiateComponent(
                        page,
                        container,
                        id,
                        componentSpecification,
                        _componentResolver.getType(),
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.