Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlCommandButton


    }

    @NotNull
    public static HtmlCommandButton addCommandButton(@NotNull
    UIComponent parent, FacesComponentIdFactory idFactory, String value, String styleClass) {
        HtmlCommandButton button = createComponent(HtmlCommandButton.class, idFactory);
        button.setValue(value);
        button.setStyleClass(styleClass);
        parent.getChildren().add(button);
        return button;
    }
View Full Code Here


       
        //FactoryFinder.setFactory(FactoryFinder.VISIT_CONTEXT_FACTORY,
        //        VisitContextFactoryImpl.class.getName());

        renderKit.addRenderer(
                new HtmlCommandButton().getFamily(),
                new HtmlCommandButton().getRendererType(),
                new HtmlButtonRenderer());
        renderKit.addRenderer(
                new HtmlForm().getFamily(),
                new HtmlForm().getRendererType(),
                new HtmlFormRenderer());
View Full Code Here

            HtmlInputText input = new HtmlInputText();
            input.setValue("var");
            input.setId("var1");
           
            HtmlCommandButton button = new HtmlCommandButton();
            button.setId("button1");
           
            UIForm form = new HtmlForm();
            form.setId("form1");
           
            form.getChildren().add(output);
View Full Code Here

    }

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

    public void setUp() throws Exception {
        super.setUp();
        writer = new MockResponseWriter(new StringWriter(), null, null);
        facesContext.setResponseWriter(writer);
        commandButton = new HtmlCommandButton();
        form = new HtmlForm();
        commandButton.setParent(form);
       
        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
        facesContext.getRenderKit().addRenderer(
View Full Code Here

{
  if (!(component instanceof HtmlCommandButton))
  {
    throw new IllegalArgumentException("Component " + component.getClass().getName() + " is no HtmlCommandButton");
  }
  HtmlCommandButton comp = (HtmlCommandButton)component;

  super.setProperties(component);

  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
  if (_alt != null)
  {
    comp.setValueExpression("alt", _alt);
  }
  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_onchange != null)
  {
    comp.setValueExpression("onchange", _onchange);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_label != null)
  {
    comp.setValueExpression("label", _label);
  }
  if (_actionListener != null)
  {
    comp.addActionListener(new MethodExpressionActionListener(_actionListener));
  }
  if (_actionExpression != null)
  {
    comp.setActionExpression(_actionExpression);
  }
  if (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
  if (_immediate != null)
  {
    comp.setValueExpression("immediate", _immediate);
  }
  if (_readonly != null)
  {
    comp.setValueExpression("readonly", _readonly);
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_onselect != null)
  {
    comp.setValueExpression("onselect", _onselect);
  }
  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_type != null)
  {
    comp.setValueExpression("type", _type);
  }
  if (_disabled != null)
  {
    comp.setValueExpression("disabled", _disabled);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_image != null)
  {
    comp.setValueExpression("image", _image);
  }
}
View Full Code Here

{
  if (!(component instanceof HtmlCommandButton))
  {
    throw new IllegalArgumentException("Component " + component.getClass().getName() + " is no HtmlCommandButton");
  }
  HtmlCommandButton comp = (HtmlCommandButton)component;

  super.setProperties(component);

  if (_disabled != null)
  {
    comp.setValueExpression("disabled", _disabled);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_actionListener != null)
  {
    comp.addActionListener(new MethodExpressionActionListener(_actionListener));
  }
  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
  if (_actionExpression != null)
  {
    comp.setActionExpression(_actionExpression);
  }
  if (_onchange != null)
  {
    comp.setValueExpression("onchange", _onchange);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_onselect != null)
  {
    comp.setValueExpression("onselect", _onselect);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_immediate != null)
  {
    comp.setValueExpression("immediate", _immediate);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_alt != null)
  {
    comp.setValueExpression("alt", _alt);
  }
  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_readonly != null)
  {
    comp.setValueExpression("readonly", _readonly);
  }
  if (_type != null)
  {
    comp.setValueExpression("type", _type);
  }
  if (_image != null)
  {
    comp.setValueExpression("image", _image);
  }
  if (_label != null)
  {
    comp.setValueExpression("label", _label);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
}
View Full Code Here

    }

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

    }

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

       
        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());
       
        HtmlOutcomeTargetButton button2 = (HtmlOutcomeTargetButton) form.findComponent("button2");
        Assert.assertNotNull(button2);
        Assert.assertEquals("rollback", button2.getOutcome());
       
        HtmlGraphicImage img1 = (HtmlGraphicImage) form.findComponent("img1");
        Assert.assertNotNull(img1);
        Assert.assertEquals("/my/image.png", img1.getUrl());
       
        HtmlCommandButton input1 = (HtmlCommandButton) form.findComponent("input1");
        Assert.assertNotNull(input1);
       
        HtmlSelectBooleanCheckbox input2 = (HtmlSelectBooleanCheckbox) form.findComponent("input2");
        Assert.assertNotNull(input2);
       
        HtmlInputText input3 = (HtmlInputText) form.findComponent("input3");
        Assert.assertNotNull(input3);

        HtmlInputText input4 = (HtmlInputText) form.findComponent("input4");
        Assert.assertNotNull(input4);

        HtmlInputText input5 = (HtmlInputText) form.findComponent("input5");
        Assert.assertNotNull(input5);

        HtmlInputText input6 = (HtmlInputText) form.findComponent("input6");
        Assert.assertNotNull(input6);

        HtmlInputText input7 = (HtmlInputText) form.findComponent("input7");
        Assert.assertNotNull(input7);

        HtmlInputText input8 = (HtmlInputText) form.findComponent("input8");
        Assert.assertNotNull(input8);

        HtmlInputText input9 = (HtmlInputText) form.findComponent("input9");
        Assert.assertNotNull(input9);

        HtmlInputText input10 = (HtmlInputText) form.findComponent("input10");
        Assert.assertNotNull(input10);

        HtmlInputText input11 = (HtmlInputText) form.findComponent("input11");
        Assert.assertNotNull(input11);

        HtmlInputText input12 = (HtmlInputText) form.findComponent("input12");
        Assert.assertNotNull(input12);

        HtmlInputText input13 = (HtmlInputText) form.findComponent("input13");
        Assert.assertNotNull(input13);

        HtmlInputText input14 = (HtmlInputText) form.findComponent("input14");
        Assert.assertNotNull(input14);
       
        HtmlInputFile input15 = (HtmlInputFile) form.findComponent("input15");
        Assert.assertNotNull(input15);
       
        HtmlInputHidden input16 = (HtmlInputHidden) form.findComponent("input16");
        Assert.assertNotNull(input16);
       
        HtmlInputSecret input17 = (HtmlInputSecret) form.findComponent("input17");
        Assert.assertNotNull(input17);
       
        HtmlCommandButton input18 = (HtmlCommandButton) form.findComponent("input18");
        Assert.assertNotNull(input18);
       
        HtmlCommandButton input19 = (HtmlCommandButton) form.findComponent("input19");
        Assert.assertNotNull(input19);

        HtmlInputText input20 = (HtmlInputText) form.findComponent("input20");
        Assert.assertNotNull(input20);
       
View Full Code Here

TOP

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

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.