472 /** |
472 /** |
473 * Generates a INPUT tag with some id. |
473 * Generates a INPUT tag with some id. |
474 * |
474 * |
475 * @param type the type of input |
475 * @param type the type of input |
476 * @param id id for the tag |
476 * @param id id for the tag |
|
477 * @param value value for the tag |
477 * @return an HtmlTree object for the INPUT tag |
478 * @return an HtmlTree object for the INPUT tag |
478 */ |
479 */ |
479 public static HtmlTree INPUT(String type, String id) { |
480 public static HtmlTree INPUT(String type, String id, String value) { |
480 HtmlTree htmltree = new HtmlTree(HtmlTag.INPUT); |
481 HtmlTree htmltree = new HtmlTree(HtmlTag.INPUT); |
481 htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type)); |
482 htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type)); |
482 htmltree.addAttr(HtmlAttr.ID, nullCheck(id)); |
483 htmltree.addAttr(HtmlAttr.ID, nullCheck(id)); |
483 htmltree.addAttr(HtmlAttr.VALUE, " "); |
484 htmltree.addAttr(HtmlAttr.VALUE, nullCheck(value)); |
484 htmltree.addAttr(HtmlAttr.DISABLED, "disabled"); |
485 htmltree.addAttr(HtmlAttr.DISABLED, "disabled"); |
|
486 return htmltree; |
|
487 } |
|
488 |
|
489 /** |
|
490 * Generates a LABEL tag with some content. |
|
491 * |
|
492 * @param forLabel value of "for" attribute of the LABEL tag |
|
493 * @param body content for the tag |
|
494 * @return an HtmlTree object for the LABEL tag |
|
495 */ |
|
496 public static HtmlTree LABEL(String forLabel, Content body) { |
|
497 HtmlTree htmltree = new HtmlTree(HtmlTag.LABEL, nullCheck(body)); |
|
498 htmltree.addAttr(HtmlAttr.FOR, nullCheck(forLabel)); |
485 return htmltree; |
499 return htmltree; |
486 } |
500 } |
487 |
501 |
488 /** |
502 /** |
489 * Generates a LI tag with some content. |
503 * Generates a LI tag with some content. |