Package org.araneaframework.uilib.form

Examples of org.araneaframework.uilib.form.FormWidget.convertAndValidate()


    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    groupHelper.setActiveGroup("active");
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());      
  }
 
  /**
   * Testing reading from request with a grouped constraint set.
   */
 
View Full Code Here


   
    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());      
  }
 
  /**
   * Testing reading from request with a primitive constraint set.
   */
 
View Full Code Here

    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    input.popScope();
   
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
           
    //valid
   
    request = new MockHttpServletRequest();
   
View Full Code Here

    input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    input.popScope();
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());
   
    //off
   
    request = new MockHttpServletRequest();
   
View Full Code Here

    input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    input.popScope();
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());
   
  }

  public void testFormAfterTodayConstraint() throws Exception {
View Full Code Here

    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    input.popScope();
   
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
           
    request = new MockHttpServletRequest();
   
    //invalid
    request.addParameter("testForm.__present", "true");
View Full Code Here

    input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    input.popScope();
   
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());

    request = new MockHttpServletRequest();
   
    //invalid   
    request.addParameter("testForm.__present", "true");
View Full Code Here

    input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    input.popScope();
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());
   
    request = new MockHttpServletRequest();
   
    //valid
    request.addParameter("testForm.__present", "true");
View Full Code Here

    input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input)
    input.popScope();
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());           
  }

  public void testFormRangeConstraint() throws Exception {

    FormWidget testForm = new FormWidget();
View Full Code Here

    ConstraintGroupHelper groupHelper = new ConstraintGroupHelper();   
    testForm.getElement("myDateTime").setConstraint(groupHelper.createGroupedConstraint(new NotEmptyConstraint(), "active"));
   
    MockUiLibUtil.emulateHandleRequest(testForm, "testForm", request);

    assertFalse("Test form must be invalid after reading from request", testForm.convertAndValidate());      
  }

  /**
   * Test reading from request with a grouped constraint set, date is invalid.
   */
 
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.