Package javax.faces.component

Examples of javax.faces.component.UIForm.findComponent()


        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);
View Full Code Here


        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

        Assert.assertNotNull(input18);
       
        HtmlCommandButton input19 = (HtmlCommandButton) form.findComponent("input19");
        Assert.assertNotNull(input19);

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

        Assert.assertNotNull(input19);

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

        Assert.assertNotNull(input20);
       
        HtmlOutputLabel label1 = (HtmlOutputLabel) form.findComponent("label1");
        Assert.assertNotNull(label1);
       
        HtmlSelectOneListbox select1 = (HtmlSelectOneListbox) form.findComponent("select1");
        Assert.assertNotNull(select1);
       
        HtmlSelectManyListbox select2 = (HtmlSelectManyListbox) form.findComponent("select2");
        Assert.assertNotNull(select2);
       
View Full Code Here

        Assert.assertNotNull(label1);
       
        HtmlSelectOneListbox select1 = (HtmlSelectOneListbox) form.findComponent("select1");
        Assert.assertNotNull(select1);
       
        HtmlSelectManyListbox select2 = (HtmlSelectManyListbox) form.findComponent("select2");
        Assert.assertNotNull(select2);
       
    }

    @Test
View Full Code Here

  // Rule: first two digits of PIN must match last two digits of the year of
  // birth
  public void validatePinDob(ComponentSystemEvent event) {

    UIForm form = (UIForm) event.getComponent();
    UIInput pin = (UIInput) form.findComponent("pesel");
    UIInput dob = (UIInput) form.findComponent("dob");
   
    if (pin.getValue() != null && dob.getValue() != null
        && pin.getValue().toString().length() >= 2) {
      String twoDigitsOfPin = pin.getValue().toString().substring(0, 2);
View Full Code Here

  // birth
  public void validatePinDob(ComponentSystemEvent event) {

    UIForm form = (UIForm) event.getComponent();
    UIInput pin = (UIInput) form.findComponent("pesel");
    UIInput dob = (UIInput) form.findComponent("dob");
   
    if (pin.getValue() != null && dob.getValue() != null
        && pin.getValue().toString().length() >= 2) {
      String twoDigitsOfPin = pin.getValue().toString().substring(0, 2);
      Calendar cal = Calendar.getInstance();
View Full Code Here

        assertTrue((getFacesContext().getRenderResponse()) &&
                   !(getFacesContext().getResponseComplete()));

        root = getFacesContext().getViewRoot();
        try {
            userName = (UIInput) basicForm.findComponent("userName");
        } catch (Throwable e) {
            System.out.println(e.getMessage());
            assertTrue("Can't find userName in tree", false);
        }
        assertTrue(null != userName);
View Full Code Here

            getFacesContext().getViewRoot().getViewId().equals(TEST_URI));
        root = getFacesContext().getViewRoot();
        // components should exist.
        assertTrue(root.getChildCount() == 1);
        assertTrue(basicForm.getId().equals(root.findComponent("basicForm").getId()));
  assertTrue(userName.getId().equals(basicForm.findComponent("userName").getId()));
        //getFacesContext().setViewRoot(null);
    }

    /**
     * This method will test the <code>registerActionListeners</code> method.
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.