本文整理匯總了Java中org.apache.wicket.markup.html.form.TextField.setType方法的典型用法代碼示例。如果您正苦於以下問題:Java TextField.setType方法的具體用法?Java TextField.setType怎麽用?Java TextField.setType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.markup.html.form.TextField
的用法示例。
在下文中一共展示了TextField.setType方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: TextDetailsPanel
import org.apache.wicket.markup.html.form.TextField; //導入方法依賴的package包/類
public TextDetailsPanel(String id, IModel<T> model, Class clazz){
super(id);
final TextField<T> text = new TextField<>(ID_INPUT, model);
text.setType(clazz);
add(text);
Label details = new Label(ID_DETAILS);
details.add(AttributeModifier.replace("title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return createAssociationTooltip();
}
}));
details.add(new InfoTooltipBehavior(){
@Override
public String getDataPlacement(){
return "bottom";
}
});
add(details);
}
示例2: onInitialize
import org.apache.wicket.markup.html.form.TextField; //導入方法依賴的package包/類
@Override
protected void onInitialize() {
super.onInitialize();
Label label = new Label("label", this.name);
this.add(label);
TextField<Double> field = new TextField<>("field", new PropertyModel<>(this.fields, this.name));
field.add(RangeValidator.range(Double.MIN_VALUE, Double.MAX_VALUE));
field.setType(Double.class);
field.setLabel(Model.of(name));
TextFeedbackPanel feedback = new TextFeedbackPanel("feedback", field);
this.add(field);
this.add(feedback);
}
示例3: onInitialize
import org.apache.wicket.markup.html.form.TextField; //導入方法依賴的package包/類
@Override
protected void onInitialize() {
super.onInitialize();
Label label = new Label("label", this.name);
this.add(label);
TextField<Character> field = new TextField<>("field", new PropertyModel<>(this.fields, this.name), Character.class);
field.add(AttributeModifier.replace("maxlength", "1"));
field.setType(Character.class);
field.setLabel(Model.of(name));
TextFeedbackPanel feedback = new TextFeedbackPanel("feedback", field);
this.add(field);
this.add(feedback);
}
示例4: onInitialize
import org.apache.wicket.markup.html.form.TextField; //導入方法依賴的package包/類
@Override
protected void onInitialize() {
super.onInitialize();
Label label = new Label("label", this.name);
this.add(label);
TextField<Long> field = new TextField<>("field", new PropertyModel<>(this.fields, this.name));
field.setLabel(Model.of(name));
field.setType(Long.class);
field.add(RangeValidator.range(Long.MIN_VALUE, Long.MAX_VALUE));
TextFeedbackPanel feedback = new TextFeedbackPanel("feedback", field);
this.add(field);
this.add(feedback);
}
示例5: TextPanel
import org.apache.wicket.markup.html.form.TextField; //導入方法依賴的package包/類
public TextPanel(String id, IModel<T> model, Class clazz) {
super(id);
final TextField<T> text = new TextField<>(ID_INPUT, model);
text.setType(clazz);
add(text);
}