Examples of IComponent


Examples of org.apache.tapestry.IComponent

      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

Examples of org.apache.tapestry.IComponent

    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

Examples of org.apache.tapestry.IComponent

    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

Examples of org.apache.tapestry.IComponent

    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

Examples of org.apache.tapestry.IComponent

     *
     **/

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

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

Examples of org.apache.tapestry.IComponent

     @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

Examples of org.apache.tapestry.IComponent

     *
     **/

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

        try
        {
View Full Code Here

Examples of org.apache.tapestry.IComponent

    /** @since 3.0 **/

    private void write(IMarkupWriter writer, LocalizationToken token)
    {
        IComponent component = getInspectedComponent();

        writer.begin("span");
        writer.attribute("class", "jwc-tag");

        writer.print("<span key=\"");
        writer.print(token.getKey());
        writer.print('"');

        Map attributes = token.getAttributes();
        if (attributes != null && !attributes.isEmpty())
        {
            Iterator it = attributes.entrySet().iterator();
            while (it.hasNext())
            {
                Map.Entry entry = (Map.Entry) it.next();
                String attributeName = (String) entry.getKey();
                String attributeValue = (String) entry.getValue();

                writer.print(' ');
                writer.print(attributeName);
                writer.print("=\"");
                writer.print(attributeValue);
                writer.print('"');

            }
        }

        writer.print('>');
        writer.begin("span");
        writer.attribute("class", "localized-string");

        writer.print(component.getMessages().getMessage(token.getKey()));
        writer.end(); // <span>

        writer.print("</span>");

        writer.end(); // <span>
View Full Code Here

Examples of org.apache.tapestry.IComponent

    /** @since 3.0 **/

    private void write(IMarkupWriter writer, boolean nextIsClose, OpenToken token)
    {
        IComponent component = getInspectedComponent();
        IEngineService service = getPage().getEngine().getService(Tapestry.DIRECT_SERVICE);
        String[] context = new String[1];

        // Each id references a component embedded in the inspected component.
        // Get that component.

        String id = token.getId();
        IComponent embedded = component.getComponent(id);
        context[0] = embedded.getIdPath();

        // Build a URL to select that component, as if by the captive
        // component itself (it's a Direct).

        ILink link = service.getLink(getPage().getRequestCycle(), this, context);
View Full Code Here

Examples of org.apache.tapestry.IComponent

        Object[] parameters = cycle.getServiceParameters();

        inspector.selectComponent((String) parameters[0]);

        IComponent newComponent = inspector.getInspectedComponent();

        // If the component is not a BaseComponent then it won't have
        // a template, so switch to the specification view.

        if (!(newComponent instanceof BaseComponent))
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.