Package org.apache.tapestry

Examples of org.apache.tapestry.IComponent


    {
        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


     *
     **/

    public String getComponentType()
    {
        IComponent container = _component.getContainer();

        IComponentSpecification containerSpecification = container.getSpecification();

        String id = _component.getId();
        IContainedComponent contained = containerSpecification.getComponent(id);

        // Temporary:  An implicit component will not be in the containing
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

      Block block = getBlock();
     
        if (block != null)
        {
            // make a copy of the inserter so we don't overwrite completely
            IComponent previousInserter = block.getInserter();
            block.setInserter(this);
            block.renderBody(writer, cycle);
            // reset the inserter as it was before we changed it
            block.setInserter(previousInserter);
        }
View Full Code Here

    protected String _expression;

    public void setBeanProperty(IBeanProvider provider, Object bean)
    {
        IResourceResolver resolver = provider.getResourceResolver();
        IComponent component = provider.getComponent();
       
        Object value = OgnlUtils.get(_expression, resolver, component);

        setBeanProperty(resolver, bean, value);
    }
View Full Code Here

    protected String _key;
 

    public void setBeanProperty(IBeanProvider provider, Object bean)
    {
        IComponent component = provider.getComponent();
        String value = component.getMessage(_key);
       
        setBeanProperty(provider.getResourceResolver(), bean, value);
    }
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

     *
     **/

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

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

     @param strDesc 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 TableUtils.generateTableColumnModel(strDesc, this, objColumnSettingsContainer);
    }
View Full Code Here

     *
     **/

    private void writeTemplate(IMarkupWriter writer, IRequestCycle cycle)
    {
        IComponent inspectedComponent = getInspectedComponent();
        ComponentTemplate template = null;
        ITemplateSource source = getPage().getEngine().getTemplateSource();

        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.