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


Java RadioChoice类代码示例

本文整理汇总了Java中org.apache.wicket.markup.html.form.RadioChoice的典型用法代码示例。如果您正苦于以下问题:Java RadioChoice类的具体用法?Java RadioChoice怎么用?Java RadioChoice使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RadioChoice类属于org.apache.wicket.markup.html.form包,在下文中一共展示了RadioChoice类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DirectInputPanel

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
public DirectInputPanel(String id, final ValidatorPage page) {
	super(id);

	Form<?> form = new Form<Void>("form") {

		private static final long serialVersionUID = 7483611710394125186L;

		protected void onSubmit() {
			String text = inputTextModel.getObject();
			if (text != null && !text.isEmpty()) {
				page.showResult(ValidatorPage.DIRECT_INPUT_MODE, text, getFormat());
			} else {
				page.clear();
			}
		}

	};

	add(form);
	form.add(new TextArea<String>("nanopubtext", inputTextModel));
	form.add(new RadioChoice<String>("format", formatModel, FORMATS).setSuffix("&nbsp;"));
}
 
开发者ID:tkuhn,项目名称:nanopub-validator,代码行数:23,代码来源:DirectInputPanel.java

示例2: 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

示例3: 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

示例4: buildRightHandSideValuesBasedComponents

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
private void buildRightHandSideValuesBasedComponents() {
	if (this.element.isRightHandSideRangeBased()) {
		this.typeOfValues = "range based";
	} else {
		this.typeOfValues = "list based";
	}

	this.typeOfValuesRadioChoice = new RadioChoice<String>("typeOfValuesRadioChoice", new PropertyModel<String>(this, "typeOfValues"), new ArrayList<String>(Arrays.asList("range based", "list based"))) {
		private static final long serialVersionUID = 2134778179415091830L;

		@Override
		public boolean isVisible() {
			return FilterExpressionPanel.this.isFilterExpressionOperatorWithValues();
		}
	};
	this.typeOfValuesRadioChoice.add(new AjaxFormChoiceComponentUpdatingBehavior() {
		private static final long serialVersionUID = 1479085520139021981L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			if (FilterExpressionPanel.this.typeOfValues.equals("range based")) {
				FilterExpressionPanel.this.element.setRightHandSideRangeBased(true);
			} else {
				FilterExpressionPanel.this.element.setRightHandSideRangeBased(false);
			}
			target.add(FilterExpressionPanel.this.table);
		}
	});
	// typeOfValuesRadioChoice.setSuffix("&nbsp;");
	this.typeOfValuesRadioChoice.setOutputMarkupId(true);
	this.layoutForm.add(this.typeOfValuesRadioChoice);

	this.buildRightHandSideRangeBasedComponent();
	this.buildRightHandSideListBasedComponent();
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:36,代码来源:FilterExpressionPanel.java

示例5: RadioGroupPanel

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
public RadioGroupPanel(final String id, final RadioGroup<T> model) {
	super(id, model);

	this.radio = new RadioChoice<T>("inputField", new PropertyModel<T>(model, "value"),
			model.getChoices());
	this.decorateComponent(this.radio);
	this.radio.setChoiceRenderer(WickedFormsChoiceRenderer.fromChoiceLabeller(model.getChoiceLabeller()));
	this.add(this.radio);
}
 
开发者ID:adessoAG,项目名称:wicked-forms,代码行数:10,代码来源:RadioGroupPanel.java

示例6: getTimeCorrelationAfterOrBeforeType

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
public RadioChoice<String> getTimeCorrelationAfterOrBeforeType() {
	return this.timeCorrelationAfterOrBeforeType;
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:4,代码来源:AdvancedCorrelationPanel.java

示例7: 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

示例8: isChoice

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
private static boolean isChoice(Component component) {
	return (component instanceof RadioChoice) ||
			(component instanceof CheckBoxMultipleChoice) || (component instanceof RadioGroup) ||
			(component instanceof CheckGroup);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:6,代码来源:FormComponentChangeAjaxEventBehavior.java

示例9: updateAllForms

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
public static void updateAllForms(DMDWebGenPageContext ctx, final AjaxRequestTarget target) {
	MarkupContainer root = findRoot(ctx.getPage());

	root.visitChildren(new IVisitor<Component, Object>() {
		@Override
		public void component(Component object, IVisit<Object> visit) {
			IModel<?> defaultModel = object.getDefaultModel();
			if (defaultModel instanceof TouchedListenerModelWrapper<?>) {
				boolean isChanged = false;
				try {
					isChanged = ((TouchedListenerModelWrapper<?>) defaultModel).modelChangedBetweenRequestProcessing(object);
				} catch (Exception e) {
					// Bei Fehler nix tun
				}
				if (isChanged) {
					((TouchedListenerModelWrapper<?>) defaultModel).preserveState(object);
					target.add(object);
				}
				// TODO blaz02: Wicket6. Zuerst den Checkbox oder
				// RadioChoice immer zum
				// Target hinzuf�gen. Die Methode
				// "modelChangedBetweenrEquestsProcessing"
				// liefert immer false. -> F�r eine Checkbox oder ein
				// RadioChoice muss es entweder einen eigenen
				// TouchedListenerModelWrapper oder ein eigenes State, so
				// das das eqausl anders programmiert wird. Der Weg ist ein
				// schlechter Hack.
				if (object instanceof CheckBox || object instanceof RadioChoice) {
					target.add(object);
				}
			} else if (object instanceof GeneratedButton) {
				GeneratedButton button = (GeneratedButton) object;
				// vocke03: DMDVIER-155
				if (button.hasButtonStateChanged()) {
					target.add(button);
				}
			}
			// Zwar ist das GenericDataTablePanel eine generische
			// Komponente, aber der Inhalt dieser Tabelle nicht. So kann
			// nicht festgestellt werden, ob sich der Inhalt
			// der Tabelle ge�ndert hat. Deswegen muss jedesmal die
			// komplette Tabelle in das Ajax-Target geschrieben werden.
			// Bl�de L�sung! meis026
			if (object instanceof GenericDataTablePanel) {
				target.add(object);
			}
		}
	});
	Component feedback = ctx.getComponentRegistry().getComponent(FeedbackElement.DEFAULT_WICKET_ID);
	if (feedback != null) {
		target.add(feedback);
	}
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:54,代码来源:SynchronizerHelper.java

示例10: getRadioChoice

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
@Override
public RadioChoice<Object> getRadioChoice() {
	return radioChoice;
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:5,代码来源:DefaultRadioChoiceBuilder.java

示例11: getRadioChoice

import org.apache.wicket.markup.html.form.RadioChoice; //导入依赖的package包/类
/**
 * Fertig gebautes Radio-Choice element erhalten
 */
public RadioChoice<T> getRadioChoice();
 
开发者ID:Nocket,项目名称:nocket,代码行数:5,代码来源:RadioChoiceBuilderI.java


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