Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlForm


        EmptyIf3TestBean bean = new EmptyIf3TestBean();
        createValueBinding(null, "value", "#{testBean}");
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);

        rootComponent = new UIViewRoot();
        HtmlForm form = new HtmlForm();
        form.setId("form");
        rootComponent.getChildren().add(form);
        inputComponent1 = new HtmlInputText();
        form.getChildren().add(inputComponent1);
        inputComponent1.setId("input1");
        inputComponent2 = new HtmlInputText();
        form.getChildren().add(inputComponent2);
        inputComponent2.setId("input2");
    }
View Full Code Here


        NotEqualsStringTestBean bean = new NotEqualsStringTestBean();
        createValueBinding(null, "value", "#{testBean}");
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);

        rootComponent = new UIViewRoot();
        HtmlForm form = new HtmlForm();
        form.setId("form");
        rootComponent.getChildren().add(form);
        inputComponent1 = new HtmlInputText();
        form.getChildren().add(inputComponent1);
        inputComponent1.setId("input1");
        inputComponent2 = new HtmlInputText();
        form.getChildren().add(inputComponent2);
        inputComponent2.setId("input2");
    }
View Full Code Here

    }

    private void createComponents()
    {
        rootComponent = new UIViewRoot();
        HtmlForm form = new HtmlForm();
        form.setId("form");
        rootComponent.getChildren().add(form);
        inputComponent1 = new HtmlInputText();
        inputComponent2 = new HtmlInputText();
        inputComponent3 = new HtmlInputText();
        form.getChildren().add(inputComponent1);
        form.getChildren().add(inputComponent2);
        form.getChildren().add(inputComponent3);
        inputComponent1.setId("input1");
        inputComponent2.setId("input2");
        inputComponent3.setId("input3");
    }
View Full Code Here

    {
        DefaultExtValCoreConfiguration.overruleActivateRequiredInitialization(true, true);

        super.setUpTestCase();

        HtmlForm form = new HtmlForm();
        facesContext.getViewRoot().getChildren().add(form);

        inputComponent = new HtmlInputText();
        inputComponent.setParent(form);
        form.getChildren().add(inputComponent);

        inputHidden = new HtmlInputHidden();
        inputHidden.setParent(form);
        form.getChildren().add(inputHidden);

        bean = new DataBean();
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);

    }
View Full Code Here

        RequiredIf1TestBean bean = new RequiredIf1TestBean();
        createValueBinding(null, "value", "#{testBean}");
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);

        rootComponent = new UIViewRoot();
        HtmlForm form = new HtmlForm();
        form.setId("form");
        rootComponent.getChildren().add(form);
        inputComponent1 = new HtmlInputText();
        form.getChildren().add(inputComponent1);
        inputComponent1.setId("input1");
        inputComponent2 = new HtmlInputText();
        form.getChildren().add(inputComponent2);
        inputComponent2.setId("input2");
    }
View Full Code Here

        DateIs3TestBean bean = new DateIs3TestBean();
        createValueBinding(null, "value", "#{testBean}");
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);

        rootComponent = new UIViewRoot();
        HtmlForm form = new HtmlForm();
        form.setId("form");
        rootComponent.getChildren().add(form);
        inputComponent1 = new HtmlInputText();
        form.getChildren().add(inputComponent1);
        inputComponent1.setId("input1");
        inputComponent2 = new HtmlInputText();
        form.getChildren().add(inputComponent2);
        inputComponent2.setId("input2");

        DateTimeConverter converter = new DateTimeConverter();
        converter.setPattern("DD/MM/yyyy");
        inputComponent1.setConverter(converter);
View Full Code Here

    @Test
    public void testPrependId() throws Exception
    {
        HtmlFormTag htmlFormTag = new HtmlFormTag();
        htmlFormTag.setPrependId(new LiteralValueExpression(false));
        HtmlForm htmlForm = new HtmlForm();
        htmlFormTag.setProperties(htmlForm);
        Assert.assertEquals(false, htmlForm.isPrependId());
    }
View Full Code Here

              facesContext.getPartialViewContext().isAjaxRequest()))
        {
            FormInfo formInfo = _ComponentUtils.findNestingForm(component, facesContext);
            if (formInfo != null && formInfo.getForm() instanceof HtmlForm)
            {
                HtmlForm form = (HtmlForm) formInfo.getForm();
                String content = form.getEnctype();
                if(content==null || !content.contains("multipart/form-data"))
                {
                     //Add facemessage
                     FacesMessage message = new FacesMessage("file upload requires a form with"+
                            " enctype equal to multipart/form-data");
View Full Code Here

        TestBean bean = new TestBean();
        createValueBinding(null, "value", "#{testBean}");
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);

        rootComponent = new UIViewRoot();
        HtmlForm form = new HtmlForm();
        form.setId("form");
        rootComponent.getChildren().add(form);
        inputComponent1 = new HtmlInputText();
        form.getChildren().add(inputComponent1);
        inputComponent1.setId("input1");

    }
View Full Code Here

        bean = new BaseValTestBean();
        ValueBinding vb = application.createValueBinding("#{testBean}");
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);

        rootComponent = new UIViewRoot();
        HtmlForm form = new HtmlForm();
        form.setId("form");
        rootComponent.getChildren().add(form);
        inputComponent = new HtmlInputText();
        form.getChildren().add(inputComponent);
        inputComponent.setId("input1");
    }
View Full Code Here

TOP

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

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.