Examples of asTable()


Examples of javango.forms.Form.asTable()

        "<tr><th><label for='id_sender'>Sender</label></th><td><input id=\"id_sender\" type=\"text\" name=\"sender\" /></td></tr>\n" +
        "<tr><th><label for='id_cost'>Cost</label></th><td><input id=\"id_cost\" type=\"text\" name=\"cost\" /></td></tr>\n" +
        "<tr><th><label for='id_ccMyself'>Carbon Copy Myself</label></th><td><input id=\"id_ccMyself\" type=\"checkbox\" name=\"ccMyself\" /></td></tr>\n" +
        "<tr><th><label for='id_value'>The Value</label></th><td><input id=\"id_value\" type=\"text\" name=\"value\" />" +
        "<input id=\"id_hiddenField\" type=\"hidden\" name=\"hiddenField\" />\n</td></tr>\n";
    assertEquals(expected, f.asTable());
  }
 
  public void testTemplateAttrs() throws Exception {
    Form f = injector.getInstance(ContactForm.class);
    ((CharField)f.getFields().get("message")).setMaxLength(20);
View Full Code Here

Examples of javango.forms.Form.asTable()

        "<tr><th>Sender</th><td><input type=\"text\" name=\"sender\" value=\"foo@example.com\" /></td></tr>\n" +
        "<tr><th>Cost</th><td><input type=\"text\" name=\"cost\" value=\"1.23\" /></td></tr>\n" +
        "<tr><th>Carbon Copy Myself</th><td><input type=\"checkbox\" name=\"ccMyself\" checked=\"checked\" /></td></tr>\n" +
        "<tr><th>The Value</th><td><input type=\"text\" name=\"value\" value=\"1234\" />" +
        "<input type=\"hidden\" name=\"hiddenField\" />\n</td></tr>\n";
    assertEquals(expected, f.asTable());
  }
 
  public static class PhoneContactFormWithCss extends ContactForm {

      public CharField phoneNumber;
View Full Code Here

Examples of javango.forms.Form.asTable()

        "<tr class=\"required\"><th>Sender</th><td><input class=\"required\" type=\"text\" name=\"sender\" value=\"foo@example.com\" /></td></tr>\n" +
        "<tr class=\"required\"><th>Cost</th><td><input class=\"required\" type=\"text\" name=\"cost\" value=\"1.23\" /></td></tr>\n" +
        "<tr class=\"required\"><th>Carbon Copy Myself</th><td><input class=\"required\" type=\"checkbox\" name=\"ccMyself\" checked=\"checked\" /></td></tr>\n" +
        "<tr class=\"required\"><th>The Value</th><td><input class=\"required\" type=\"text\" name=\"value\" value=\"1234\" />" +
        "<input type=\"hidden\" name=\"hiddenField\" />\n</td></tr>\n";
    assertEquals(expected, f.asTable());
  }
}
View Full Code Here

Examples of javango.forms.Form.asTable()

        "<tr class=\"myRequiredClass\"><th>Sender</th><td><input class=\"myRequiredClass\" type=\"text\" name=\"sender\" value=\"foo@example.com\" /></td></tr>\n" +
        "<tr class=\"myRequiredClass\"><th>Cost</th><td><input class=\"myRequiredClass\" type=\"text\" name=\"cost\" value=\"1.23\" /></td></tr>\n" +
        "<tr class=\"myRequiredClass\"><th>Carbon Copy Myself</th><td><input class=\"myRequiredClass\" type=\"checkbox\" name=\"ccMyself\" checked=\"checked\" /></td></tr>\n" +
        "<tr class=\"myRequiredClass\"><th>The Value</th><td><input class=\"myRequiredClass\" type=\"text\" name=\"value\" value=\"1234\" />" +
        "<input type=\"hidden\" name=\"hiddenField\" />\n</td></tr>\n";
    assertEquals(expected, f.asTable());
  }
}
View Full Code Here

Examples of javango.forms.Form.asTable()

    String expected = "<tr><th>Subject</th><td><input type=\"text\" name=\"prefix-subject\" value=\"hello\" />The subject of the message</td></tr>\n" +
        "<tr><th>Message</th><td><input type=\"text\" name=\"prefix-message\" value=\"Hi there\" /></td></tr>\n" +
        "<tr><th>Sender</th><td><input type=\"text\" name=\"prefix-sender\" value=\"foo@example.com\" /></td></tr>\n" +
        "<tr><th>Cc Myself</th><td><input type=\"checkbox\" name=\"prefix-ccMyself\" checked=\"checked\" /></td></tr>\n" +
        "<tr><th>Value</th><td><ul class=\"errorlist\"><li>Integer number not valid</li></ul><input type=\"text\" name=\"prefix-value\" value=\"qwer\" /></td></tr>\n";
    assertEquals(expected, f.asTable());
  }
 
}
View Full Code Here

Examples of javango.forms.Form.asTable()

   
    String expected =
        "<tr><th><label for='id_pickme'>Pickme</label></th><td><input id=\"id_pickme\" type=\"checkbox\" name=\"pickme\" disabled=\"disabled\" /></td></tr>\n" +
        "<tr><th><label for='id_selectme'>Selectme</label></th><td><select id=\"id_selectme\" name=\"selectme\" disabled=\"disabled\"><option value=\"\" >--</option><option value=\"Y\" >Yes</option><option value=\"N\" >No</option></select></td></tr>\n";

    assertEquals(expected, form.asTable());   
  }
}
View Full Code Here

Examples of javango.forms.Form.asTable()

        "<tr><th>Language</th><td><ul>\n" +
        "<li><label><input name=\"language\" type=\"radio\" value=\"P\" /> Python</label></li>\n" +
        "<li><label><input name=\"language\" type=\"radio\" value=\"J\" /> Java</label></li>\n" +
        "</ul></td></tr>\n";
   
    assertEquals(output2, f.asTable());
  }

  public void testRadioFieldId() throws Exception {
    Form f = new FrameworkForm(
        injector.getInstance(FieldFactory.class), injector.getInstance(WidgetFactory.class))
View Full Code Here

Examples of javango.forms.Form.asTable()

        "<tr><th><label for='id_language'>Language</label></th><td><ul>\n" +
        "<li><label for='id_language_0'><input id=\"id_language_0\" name=\"language\" type=\"radio\" value=\"P\" /> Python</label></li>\n" +
        "<li><label for='id_language_1'><input id=\"id_language_1\" name=\"language\" type=\"radio\" value=\"J\" /> Java</label></li>\n" +
        "</ul></td></tr>\n";
   
    assertEquals(output2, f.asTable());
  }

  public void testHorizontalRender() throws Exception {   
    Map<Object, Object> choices = new LinkedHashMap<Object, Object>();
    choices.put("J", "John");
View Full Code Here

Examples of javango.forms.Form.asTable()

    String expected = "<tr><th>Subject</th><td><input type=\"text\" name=\"prefix-subject\" value=\"hello\" /></td></tr>\n" +
        "<tr><th>Message</th><td><input type=\"text\" name=\"prefix-message\" value=\"Hi there\" /></td></tr>\n" +
        "<tr><th>Sender</th><td><input type=\"text\" name=\"prefix-sender\" value=\"foo@example.com\" /></td></tr>\n" +
        "<tr><th>Cc Myself</th><td><input type=\"checkbox\" name=\"prefix-ccMyself\" checked=\"checked\" /></td></tr>\n" +
        "<tr><th>Value</th><td><ul class=\"errorlist\"><li>Integer number not valid</li></ul><input type=\"text\" name=\"prefix-value\" value=\"qwer\" /></td></tr>\n";
    assertEquals(expected, f.asTable());
  }
 
}
View Full Code Here

Examples of javango.forms.Form.asTable()

    String expected = "<tr><th>Subject</th><td><input type=\"text\" name=\"prefix-subject\" value=\"hello\" /></td></tr>\n" +
        "<tr><th>Message</th><td><input type=\"text\" name=\"prefix-message\" value=\"Hi there\" /></td></tr>\n" +
        "<tr><th>Sender</th><td><input type=\"text\" name=\"prefix-sender\" value=\"foo@example.com\" /></td></tr>\n" +
        "<tr><th>Cc Myself</th><td><input type=\"checkbox\" name=\"prefix-ccMyself\" checked=\"checked\" /></td></tr>\n" +
        "<tr><th>Value</th><td><input type=\"text\" name=\"prefix-value\" value=\"1234\" /></td></tr>\n";
    assertEquals(expected, f.asTable());
  }
 
  public void testPost() throws Exception {
    Map<String, String[]> m = new HashMap<String, String[]>();
    m.put("prefix-subject", new String[] {"hello"});
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.