Package org.araneaframework

Examples of org.araneaframework.Widget


    handleUpdate(input);
   
    Iterator ite = (new HashMap(getChildren())).keySet().iterator();
    while(ite.hasNext()) {
      Object key = ite.next();
      Widget widget = (Widget)getChildren().get(key);
      if (widget != null) {
      try {
          input.pushScope(key);
        widget._getWidget().update(input);
      }
      finally {
        input.popScope();
      }
    }
View Full Code Here


    }
   
    if (path.hasNext()) {
      Object next = path.next();
     
      Widget pWidget = (Widget)getChildren().get(next);          
     
      if (pWidget == null ) {
        log.warn("No widget found", new NoSuchWidgetException(next.toString()))
        return;
      }
     
      try {
        input.pushScope(next);
        pWidget._getWidget().event(path, input);
      }
      finally {
        input.popScope();
      }
View Full Code Here

  protected void process() throws Exception {
    handleProcess();
   
    Iterator ite = (new HashMap(getChildren())).keySet().iterator();
    while(ite.hasNext()) {
      Widget child = (Widget)getChildren().get(ite.next());
      if (child != null) {
      child._getWidget().process();
    }
  }
  }
View Full Code Here

   */
  public void testFormRequestHandling() throws Exception {

    FormWidget testForm = makeUsualForm();
   
    Widget currentWidget = testForm;
   
    MockHttpServletRequest validRequest = new MockHttpServletRequest();

    validRequest.addParameter("testForm.__present", "true");
    validRequest.addParameter("testForm.myCheckBox", "true");
    validRequest.addParameter("testForm.myLongText", "108");
    validRequest.addParameter("testForm.myDateTime.date", "11.10.2015");
    validRequest.addParameter("testForm.myDateTime.time", "01:01");
    validRequest.addParameter("testForm.hierarchyTest.myTextarea", "blah");
    validRequest.addParameter("testForm.hierarchyTest.mySelect", "2");   
   
   
    MockUiLibUtil.emulateHandleRequest(currentWidget, "testForm", validRequest);
    currentWidget._getWidget().process();             

    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("myCheckBox")._getViewable().getViewModel()).getSimpleValue().equals("true"));
    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("myLongText")._getViewable().getViewModel()).getSimpleValue().equals("108"));
    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("hierarchyTest.myTextarea")._getViewable().getViewModel()).getSimpleValue().equals("blah"));
    assertTrue(((StringArrayRequestControl.ViewModel) testForm.getControlByFullName("hierarchyTest.mySelect")._getViewable().getViewModel()).getSimpleValue().equals("2"));    
View Full Code Here

TOP

Related Classes of org.araneaframework.Widget

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.