Package javango.forms.widgets

Examples of javango.forms.widgets.PercentInputWidget.asText()


    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));   
  }

  public void testHtmlValue() throws Exception {
    PercentInputWidget w = injector.getInstance(PercentInputWidget.class);
    w.setDecimalPlaces(0);
View Full Code Here


    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));   
  }

  public static class Form extends AbstractForm {

    public PercentField percent;
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.