Package javango.forms.widgets

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


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


    Double value = null;
    String output = w.render("field", value, new LinkedHashMap<String, Object>());
    String html = "<input type=\"text\" name=\"field\" />";
    assertEquals(html, output);
   
    assertEquals("", w.asText(value));
  }

  public void testNullValueHtml() {
    DecimalInputWidget w = new DecimalInputWidget();
    w.setDecimalPlaces(2);
View Full Code Here

    Double[] value = new Double[]{};
    String output = w.render("field", value, new LinkedHashMap<String, Object>());
    String html = "<input type=\"text\" name=\"field\" />";
    assertEquals(html, output);
   
    assertEquals("", w.asText(value));
  }

  public void testOnePlace() {
    DecimalInputWidget w = new DecimalInputWidget();
    w.setDecimalPlaces(1);
View Full Code Here

  }
 
  public void testRedonly() {
    Widget w = new DateWidget();
    Date value = new Date("1/1/2010");
    String output = w.asText(value);
    String html = "01/01/2010";
    assertEquals(html, output);
  }
}
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.