Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Apr 10, 2018
2 parents 2c6254c + 35533da commit c81b95d
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -40,6 +40,7 @@
import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
import org.apache.wicket.extensions.yui.calendar.DateTimeField;
import org.apache.wicket.feedback.ComponentFeedbackMessageFilter;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.FormComponent;
Expand Down Expand Up @@ -248,6 +249,15 @@ public boolean isEnabled() {

return object == null || isAccessible(def, object.getStatus());
}

@Override
public void onComponentTag(Component component, ComponentTag tag) {
if (component instanceof TextField && !isEnabled()) {
tag.remove("disabled");
tag.append("class", "input-readonly", " ");
tag.append("readonly", "readonly", " ");
}
}
});
}
}
Expand Down

0 comments on commit c81b95d

Please sign in to comment.