Package org.apache.tapestry

Examples of org.apache.tapestry.IComponent


                    _loadComponent, location, null);
    }

    private IComponent createImplicitComponent(String id, String componentType, Location location)
    {
        IComponent result = _pageLoader.createImplicitComponent(
                _requestCycle,
                _loadComponent,
                id,
                componentType,
                location);
View Full Code Here


        return _component.getSpecification().getComponent(componentId) != null;
    }

    public boolean getAllowBody(String componentId, Location location)
    {
        IComponent embedded = _component.getComponent(componentId);

        if (embedded == null)
            throw Tapestry.createNoSuchComponentException(_component, componentId, location);

        return embedded.getSpecification().getAllowBody();
    }
View Full Code Here

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

        ActionServiceParameter asp = (ActionServiceParameter) parameter;

        IComponent component = asp.getComponent();
        IPage activePage = cycle.getPage();
        IPage componentPage = component.getPage();

        Map parameters = new HashMap();

        boolean stateful = _request.getSession(false) != null;

        parameters.put(ServiceConstants.SERVICE, Tapestry.ACTION_SERVICE);
        parameters.put(ServiceConstants.COMPONENT, component.getIdPath());
        parameters.put(ServiceConstants.PAGE, activePage.getPageName());
        parameters.put(ServiceConstants.CONTAINER, activePage == componentPage ? null
                : componentPage.getPageName());
        parameters.put(ACTION, asp.getActionId());
        parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
View Full Code Here

        cycle.activate(page);

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

        IComponent component = componentPage.getNestedComponent(componentId);

        IAction action = null;

        try
        {
View Full Code Here

    {
        if (_sortedComponents != null)
            return _sortedComponents;

        Inspector inspector = (Inspector) getPage();
        IComponent inspectedComponent = inspector.getInspectedComponent();

        // Get a Map of the components and simply return null if there
        // are none.

        Map components = inspectedComponent.getComponents();

        _sortedComponents = new ArrayList(components.values());

        Collections.sort(_sortedComponents, new ComponentComparitor());
View Full Code Here

     */
    private static class ComponentComparitor implements Comparator
    {
        public int compare(Object left, Object right)
        {
            IComponent leftComponent;
            String leftId;
            IComponent rightComponent;
            String rightId;

            if (left == right)
                return 0;

            leftComponent = (IComponent) left;
            rightComponent = (IComponent) right;

            leftId = leftComponent.getId();
            rightId = rightComponent.getId();

            return leftId.compareTo(rightId);
        }
View Full Code Here

    public List getCrumbTrail()
    {
        List result = null;

        Inspector inspector = (Inspector) getPage();
        IComponent component = inspector.getInspectedComponent();
        IComponent container = null;

        while (true)
        {
            container = component.getContainer();
            if (container == null)
View Full Code Here

    public List getCrumbTrail()
    {
        List result = null;

        Inspector inspector = (Inspector) getPage();
        IComponent component = inspector.getInspectedComponent();
        IComponent container = null;

        while (true)
        {
            container = component.getContainer();
            if (container == null)
View Full Code Here

     *            the description of the column model to be generated
     * @return a table column model based on the provided description
     */
    protected ITableColumnModel generateTableColumnModel(String strDesc)
    {
        IComponent objColumnSettingsContainer = getColumnSettingsContainer();

        return getModelSource().generateTableColumnModel(strDesc, this, objColumnSettingsContainer);
    }
View Full Code Here

        MockControl sourcec = newControl(PropertyPersistenceStrategySource.class);
        PropertyPersistenceStrategySource source = (PropertyPersistenceStrategySource) sourcec
                .getMock();

        MockControl componentc = newControl(IComponent.class);
        IComponent component = (IComponent) componentc.getMock();

        MockControl specc = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) specc.getMock();

        MockControl psc = newControl(IPropertySpecification.class);
        IPropertySpecification ps = (IPropertySpecification) psc.getMock();

        component.getSpecification();
        componentc.setReturnValue(spec);

        spec.getPropertySpecification("zip");
        specc.setReturnValue(ps);
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.