Examples of ILinkComponent


Examples of org.apache.tapestry.components.ILinkComponent

    public void testStandardNotDisabled()
    {
        IMarkupWriter writer = newWriter();
        NestedMarkupWriter nested = newNestedWriter();
        IRequestCycle cycle = newCycle();
        ILinkComponent component = newComponent();
        ILink link = newLink();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);
        cycle.setAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, component);

        trainIsDisabled(component, false);

        writer.begin("a");

        trainGetLink(component, cycle, link);

        trainGetScheme(component, null);
        trainGetAnchor(component, null);

        trainGetURL(link, null, null, "/foo/bar.baz");

        writer.attribute("href", "/foo/bar.baz");

        trainGetTarget(component, null);

        trainGetNestedWriter(writer, nested);

        component.renderBody(nested, cycle);

        component.renderAdditionalAttributes(writer, cycle);

        nested.close();

        writer.end();
View Full Code Here

Examples of org.apache.tapestry.components.ILinkComponent

    public void testStandardWithSchemaAnchorAndTarget()
    {
        IMarkupWriter writer = newWriter();
        NestedMarkupWriter nested = newNestedWriter();
        IRequestCycle cycle = newCycle();
        ILinkComponent component = newComponent();
        ILink link = newLink();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);
        cycle.setAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, component);

        trainIsDisabled(component, false);

        writer.begin("a");

        trainGetLink(component, cycle, link);

        trainGetScheme(component, "https");

        trainGetAnchor(component, "my-anchor");

        trainGetURL(link, "https", "my-anchor", "http://zap.com/foo/bar.baz#my-anchor");

        writer.attribute("href", "http://zap.com/foo/bar.baz#my-anchor");

        trainGetTarget(component, "some-target");

        writer.attribute("target", "some-target");

        trainGetNestedWriter(writer, nested);

        component.renderBody(nested, cycle);

        component.renderAdditionalAttributes(writer, cycle);

        nested.close();

        writer.end();
View Full Code Here

Examples of org.apache.tapestry.components.ILinkComponent

    public void testDisabled()
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle();
        ILinkComponent component = newComponent();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);
        cycle.setAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, component);

        trainIsDisabled(component, true);

        component.renderBody(writer, cycle);

        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replayControls();
View Full Code Here

Examples of org.apache.tapestry.components.ILinkComponent

    public void testWithSubclass()
    {
        IMarkupWriter writer = newWriter();
        NestedMarkupWriter nested = newNestedWriter();
        IRequestCycle cycle = newCycle();
        ILinkComponent component = newComponent();
        ILink link = newLink();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);
        cycle.setAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, component);

        trainIsDisabled(component, false);

        writer.begin("xlink");

        trainGetLink(component, cycle, link);

        trainGetScheme(component, null);

        trainGetAnchor(component, "my-anchor");

        trainGetURL(link, null, "my-anchor", "/foo/bar.baz#my-anchor");

        writer.attribute("xurl", "/foo/bar.baz#my-anchor");

        trainGetTarget(component, "some-target");

        writer.attribute("xtarget", "some-target");

        writer.print("BEFORE-BODY-RENDER");

        trainGetNestedWriter(writer, nested);

        component.renderBody(nested, cycle);

        writer.print("AFTER-BODY-RENDER");

        component.renderAdditionalAttributes(writer, cycle);

        nested.close();

        writer.end();
View Full Code Here

Examples of org.apache.tapestry.components.ILinkComponent

    {
        IMarkupWriter writer = newWriter();
        NestedMarkupWriter nested = newNestedWriter();

        IRequestCycle cycle = newCycle();
        ILinkComponent component = newComponent();
        ILink link = newLink();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);
        cycle.setAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, component);

        trainIsDisabled(component, false);

        writer.beginEmpty("xlink");

        trainGetLink(component, cycle, link);

        trainGetScheme(component, null);

        trainGetAnchor(component, "my-anchor");

        trainGetURL(link, null, "my-anchor", "/foo/bar.baz#my-anchor");

        writer.attribute("xurl", "/foo/bar.baz#my-anchor");

        trainGetTarget(component, "some-target");

        writer.attribute("xtarget", "some-target");

        writer.print("BEFORE-BODY-RENDER");

        trainGetNestedWriter(writer, nested);

        writer.print("AFTER-BODY-RENDER");

        writer.closeTag();

        component.renderAdditionalAttributes(writer, cycle);

        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replayControls();
View Full Code Here

Examples of org.apache.tapestry.components.ILinkComponent

    public void testWithSubclassDisabled()
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle();
        ILinkComponent component = newComponent();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);
        cycle.setAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, component);

        trainIsDisabled(component, true);

        component.renderBody(writer, cycle);

        cycle.removeAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        replayControls();
View Full Code Here

Examples of org.apache.tapestry.components.ILinkComponent

    public void testWithSubclassDisabledNoBody()
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle();
        ILinkComponent component = newComponent();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);
        cycle.setAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, component);

        trainIsDisabled(component, true);
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.