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();
        Location l = newLocation();
        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

Examples of org.apache.tapestry.components.ILinkComponent

                Tapestry.getMessage("Rollover.must-be-contained-by-body"),
                this,
                null,
                null);}

        __CLOVER_161_0.S[3921]++;ILinkComponent serviceLink =
            (ILinkComponent) cycle.getAttribute(Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME);

        __CLOVER_161_0.S[3922]++;if ((((serviceLink == null) && (++__CLOVER_161_0.CT[735] != 0)) || (++__CLOVER_161_0.CF[735] == 0))){
            __CLOVER_161_0.S[3923]++;throw new ApplicationRuntimeException(
                Tapestry.getMessage("Rollover.must-be-contained-by-link"),
                this,
                null,
                null);}

        __CLOVER_161_0.S[3924]++;boolean linkDisabled = serviceLink.isDisabled();

        __CLOVER_161_0.S[3925]++;if ((((linkDisabled) && (++__CLOVER_161_0.CT[736] != 0)) || (++__CLOVER_161_0.CF[736] == 0))){
        {
            __CLOVER_161_0.S[3926]++;imageURL = getAssetURL(getDisabled(), cycle);
View Full Code Here

Examples of org.apache.tapestry.components.ILinkComponent

    public void testNoNesting()
    {
        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle();
        ILinkComponent existing = newComponent();
        ILinkComponent active = newComponent();
        Location l = newLocation();

        trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, existing);

        trainGetLocation(active, l);
View Full Code Here

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);
        trainIsRewinding(cycle, false);

        writer.begin("a");
       
        component.renderAdditionalAttributes(writer, cycle);
       
        trainGetLink(component, cycle, link);

        trainGetScheme(component, null);
        trainGetPort(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);

        nested.close();

        writer.end();
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.