Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
language: java
jdk:
- oraclejdk8
- openjdk8

Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ public class DateWidget implements Widget {
/**
* @see Widget#render(WidgetConfig)
*/
@Override
public void render(WidgetConfig config, Writer w) throws IOException {

HtmlUtil.renderResource(w, config.getRequest(), "/scripts/calendar/calendar.js");

Object idPrefix = config.getId();
config.setFixedAttribute("onchange", "disableButtons('" + idPrefix + "')");
config.setFixedAttribute("onkeyup", "disableButtons('" + idPrefix + "')");
config.setFixedAttribute("size", "10");
config.setFixedAttribute("onClick", "showCalendar(this);");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ public class TextAreaWidget implements Widget {
/**
* @see Widget#render(WidgetConfig)
*/
@Override
public void render(WidgetConfig config, Writer w) throws IOException {

Object idPrefix = config.getId();
config.setFixedAttribute("onkeyup", "disableButtons('" + idPrefix + "')");
config.setDefaultAttribute("cols", "20");
config.setDefaultAttribute("rows", "2");
HtmlUtil.renderOpenTag(w, "textarea", config.getAttributes());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ public class TextWidget implements Widget {
/**
* @see Widget#render(WidgetConfig)
*/
@Override
public void render(WidgetConfig config, Writer w) throws IOException {

Object idPrefix = config.getId();
config.setFixedAttribute("onkeyup", "disableButtons('" + idPrefix + "')");
String textValue = config.getDefaultValue() == null ? "" : config.getDefaultValue().toString();
config.setFixedAttribute("type", "text");
config.setDefaultAttribute("value", textValue);
Expand Down