Examples of PercentInputWidget


Examples of javango.forms.widgets.PercentInputWidget

   
    assertEquals("", w.asText(value));   
  }
 
  public void testHtml0() throws Exception {
    PercentInputWidget w = injector.getInstance(PercentInputWidget.class);
    w.setDecimalPlaces(0);
    Double value = 0.0;
    String output = w.render("field", value, new LinkedHashMap<String, Object>());
    String html = "<input type=\"text\" name=\"field\" value=\"0\" />";
    assertEquals(html, output);
   
    assertEquals("0", w.asText(value));   
  }
View Full Code Here

Examples of javango.forms.widgets.PercentInputWidget

   
    assertEquals("0", w.asText(value));   
  }

  public void testHtmlValue() throws Exception {
    PercentInputWidget w = injector.getInstance(PercentInputWidget.class);
    w.setDecimalPlaces(0);
    Double value = .45;
    String output = w.render("field", value, new LinkedHashMap<String, Object>());
    String html = "<input type=\"text\" name=\"field\" value=\"45\" />";
    assertEquals(html, output);
   
    assertEquals("45", w.asText(value));   
  }
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.