当前位置: 首页>>代码示例>>Java>>正文


Java RadioChoice.setModelObject方法代码示例

本文整理汇总了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);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:14,代码来源:CategoryPanel.java

示例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);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:14,代码来源:UploadPanel.java

示例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);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:42,代码来源:CorrelationPage.java


注:本文中的org.apache.wicket.markup.html.form.RadioChoice.setModelObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。