Examples of pushScope()


Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

  }
 
  public static void emulateHandleRequest(Widget widget, String widgetId, HttpServletRequest request) throws Exception {
    StandardServletInputData input = new StandardServletInputData(request);
   
    input.pushScope(widgetId);
    widget._getWidget().update(input);
    input.popScope();
 
}
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

    validRequest.addParameter("testForm.hierarchyTest.myTextarea", "blah");
    validRequest.addParameter("testForm.hierarchyTest.mySelect", "2");

    //Trying to read from a valid request
    StandardServletInputData input = new StandardServletInputData(validRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    Date reqDate = (new SimpleDateFormat("dd.MM.yyyy hh:mm")).parse("11.10.2015 01:01");

    //Checking that reading from request works
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

    invalidRequest.addParameter("testForm.myDateTime.time", "BLAH");
    invalidRequest.addParameter("testForm.hierarchyTest.myTextarea", "");   

    //Testing that invalid requests are read right
    StandardServletInputData input = new StandardServletInputData(invalidRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

    mandatoryMissingRequest.addParameter("testForm.myDateTime.time", "01:01");
    mandatoryMissingRequest.addParameter("testForm.hierarchyTest.mySelect", "2");

    //Testing that mandatory items are processed right
    StandardServletInputData input = new StandardServletInputData(mandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

    notMandatoryMissingRequest.addParameter("testForm.myLongText", "108");
    notMandatoryMissingRequest.addParameter("testForm.hierarchyTest.myTextarea", "blah");
    notMandatoryMissingRequest.addParameter("testForm.hierarchyTest.mySelect", "2");

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

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

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

    StandardServletInputData input = new StandardServletInputData(notMandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);

    groupHelper.setActiveGroup("active");

    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());       
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

    // create helper
    ConstraintGroupHelper groupHelper = new ConstraintGroupHelper();   
    testForm.getElement("myDateTime").setConstraint(groupHelper.createGroupedConstraint(new NotEmptyConstraint(), "active"));
   
    StandardServletInputData input = new StandardServletInputData(notMandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    groupHelper.setActiveGroup("active");
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());      
  }
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

    // create helper
    ConstraintGroupHelper groupHelper = new ConstraintGroupHelper();   
    testForm.getElement("myDateTime").setConstraint(groupHelper.createGroupedConstraint(new NotEmptyConstraint(), "active"));
   
    StandardServletInputData input = new StandardServletInputData(notMandatoryMissingRequest);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    assertTrue("Test form must be valid after reading from request", testForm.convertAndValidate());      
  }
 
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

    //Testing primitive constraint
    testForm.getElement("myDateTime").setConstraint(new NotEmptyConstraint());
   
    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }

  /**
 
View Full Code Here

Examples of org.araneaframework.servlet.core.StandardServletInputData.pushScope()

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

    StandardServletInputData input = new StandardServletInputData(request);
    input.pushScope("testForm");
    testForm._getWidget().update(input);
   
    groupHelper.setActiveGroup("active");
    assertTrue("Test form must not be valid after reading from request", !testForm.convertAndValidate());
  }
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.