Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlOutcomeTargetLink


            writer.write(StringUtils.toString(getLinkValue(helper.hasColumn()), ""));
            writer.endElement(tag);
        }
        else
        {   // Add component
            HtmlOutcomeTargetLink linkComponent = null;
            if (getChildCount() > 0)
            {
                UIComponent c = getChildren().get(0);
                if (c instanceof HtmlOutcomeTargetLink)
                    linkComponent = (HtmlOutcomeTargetLink)c;
                else
                {   // Something's wrong here?
                    log.info("INFO: Unexpected child node for {}! Child item type is {}.", getClass().getName(), c.getClass().getName());
                    // Check facetComponent
                    UIPanel facetComponent = (UIPanel)getFacets().get(UIComponent.COMPOSITE_FACET_NAME);
                    if (facetComponent==null)
                    {
                        log.warn("WARN: component's facetComponent has not been set! Using Default (javax.faces.Panel).");
                        log.warn("Problem might be related to Mojarra 2.1.7 to 2.1.11 (and possibly later) - please use Mojarra 2.1.6!");
                        facetComponent = (UIPanel)context.getApplication().createComponent("javax.faces.Panel");
                        facetComponent.setRendererType("javax.faces.Group");
                        getFacets().put(UIComponent.COMPOSITE_FACET_NAME, facetComponent);
                    }
                }   
            }
            if (linkComponent == null)
            {
                linkComponent = new HtmlOutcomeTargetLink();
                this.getChildren().add(0, linkComponent);
            }
            // set params
            setLinkProperties(linkComponent);
            addOrSetParam(linkComponent, "idparam", "id");
            // encode link
            linkComponent.setRendered(true);
            linkComponent.encodeAll(context);
            linkComponent.setRendered(false); // Don't render twice!
        }
    }
View Full Code Here


    }

    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutcomeTargetLink();
    }
View Full Code Here

    }

    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutcomeTargetLink();
    }
View Full Code Here

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);

        writer = new MockResponseWriter(new StringWriter(), null, "UTF-8");
        facesContext.setResponseWriter(writer);
View Full Code Here

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);

        writer = new MockResponseWriter(new StringWriter(), null, "UTF-8");
        facesContext.setResponseWriter(writer);
View Full Code Here

    }

    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutcomeTargetLink();
    }
View Full Code Here

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);

        writer = new MockResponseWriter(new StringWriter(), null, "UTF-8");
        facesContext.setResponseWriter(writer);
View Full Code Here

    }

    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutcomeTargetLink();
    }
View Full Code Here

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);

        writer = new MockResponseWriter(new StringWriter(), null, "UTF-8");
        facesContext.setResponseWriter(writer);
View Full Code Here

       
        HtmlOutputLink link3 = (HtmlOutputLink) form.findComponent("link3");
        Assert.assertNotNull(link3);
        Assert.assertEquals("/my/new/location.txt", link3.getValue());
       
        HtmlOutcomeTargetLink link4 = (HtmlOutcomeTargetLink) form.findComponent("link4");
        Assert.assertNotNull(link4);
        Assert.assertEquals("rollback", link4.getOutcome());
       
        HtmlCommandButton button = (HtmlCommandButton) form.findComponent("button1");
        Assert.assertNotNull(button);
        Assert.assertEquals("#{test.testAction}", button.getActionExpression().getExpressionString());
       
View Full Code Here

TOP

Related Classes of javax.faces.component.html.HtmlOutcomeTargetLink

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.