本文整理汇总了Java中org.apache.wicket.markup.html.form.RadioChoice.setModelObject方法的典型用法代码示例。如果您正苦于以下问题:Java RadioChoice.setModelObject方法的具体用法?Java RadioChoice.setModelObject怎么用?Java RadioChoice.setModelObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.html.form.RadioChoice
的用法示例。
在下文中一共展示了RadioChoice.setModelObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRadioChoiceForTimeMode
import org.apache.wicket.markup.html.form.RadioChoice; //导入方法依赖的package包/类
private void addRadioChoiceForTimeMode(Form<Void> form) {
final RadioChoice<TimeMode> timeModeRadioChoice = new RadioChoice<TimeMode>("timeModeChoice", new Model<TimeMode>(), Arrays.asList(TimeMode.values()));
timeModeRadioChoice.add(new AjaxFormChoiceComponentUpdatingBehavior() {
@Override
protected void onUpdate(final AjaxRequestTarget target) {
timeMode = timeModeRadioChoice.getModelObject();
}
});
timeModeRadioChoice.setModelObject(TimeMode.values()[0]);
timeModeRadioChoice.setOutputMarkupId(true);
form.add(timeModeRadioChoice);
}
示例2: addRadioChoiceForFileType
import org.apache.wicket.markup.html.form.RadioChoice; //导入方法依赖的package包/类
private void addRadioChoiceForFileType() {
final RadioChoice<FileType> fileTypeRadioChoice = new RadioChoice<FileType>("fileTypeChoice", new Model<FileType>(), Arrays.asList(FileType.values()));
fileTypeRadioChoice.add(new AjaxFormChoiceComponentUpdatingBehavior() {
@Override
protected void onUpdate(final AjaxRequestTarget target) {
fileType = fileTypeRadioChoice.getModelObject();
}
});
fileTypeRadioChoice.setModelObject(fileType);
fileTypeRadioChoice.setOutputMarkupId(true);
this.layoutForm.add(fileTypeRadioChoice);
}
示例3: CorrelationPage
import org.apache.wicket.markup.html.form.RadioChoice; //导入方法依赖的package包/类
public CorrelationPage() {
super();
this.correlationPage = this;
this.processNameList = new ArrayList<String>();
for (final CorrelationProcess process : CorrelationProcess.findAll()) {
this.processNameList.add(process.getName());
}
this.layoutForm = new WarnOnExitForm("layoutForm");
this.add(this.layoutForm);
this.processSelect = new DropDownChoice<String>("processSelect", new Model<String>(), this.processNameList);
this.processSelect.setOutputMarkupId(true);
this.layoutForm.add(this.processSelect);
final RadioChoice<String> simpleCorrelationWithRulesRadioChoice = new RadioChoice<String>("simpleCorrelationWithRulesRadioChoice", new Model<String>(), Arrays.asList("same-name attributes", "correlation rules"));
simpleCorrelationWithRulesRadioChoice.add(new AjaxFormChoiceComponentUpdatingBehavior() {
@Override
protected void onUpdate(final AjaxRequestTarget target) {
CorrelationPage.this.simpleCorrelationWithRules = simpleCorrelationWithRulesRadioChoice.getModelObject().equals("correlation rules");
CorrelationPage.this.updateSimpleCorrelationPanelComponents(target);
CorrelationPage.this.updateSimpleCorrelationWithRulesPanelComponents(target);
}
});
simpleCorrelationWithRulesRadioChoice.setModelObject("same-name attributes");
this.layoutForm.add(simpleCorrelationWithRulesRadioChoice);
this.addApplyButton(this.layoutForm);
this.addCorrelationTabs();
this.addProcessEditorModal();
this.existingCorrelationAlert = new ExistingCorrelationAlert("warning", "Correlation exists! Do you want to override it?", this);
this.existingCorrelationAlert.setVisible(false);
this.existingCorrelationAlert.setOutputMarkupId(true);
this.existingCorrelationAlert.setOutputMarkupPlaceholderTag(true);
this.add(this.existingCorrelationAlert);
}