本文整理汇总了Java中org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior类的典型用法代码示例。如果您正苦于以下问题:Java AjaxFormComponentUpdatingBehavior类的具体用法?Java AjaxFormComponentUpdatingBehavior怎么用?Java AjaxFormComponentUpdatingBehavior使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AjaxFormComponentUpdatingBehavior类属于org.apache.wicket.ajax.form包,在下文中一共展示了AjaxFormComponentUpdatingBehavior类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onInitialize
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
@Override
protected void onInitialize() {
super.onInitialize();
setOutputMarkupId(true);
add(new AjaxFormComponentUpdatingBehavior("change") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (selection != null) {
onSelect(target, selection);
selection = null;
}
String script = String.format("$('#%s').select2('data', null);", getMarkupId());
target.appendJavaScript(script);
}
});
}
示例2: initLayout
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private void initLayout() {
final TextField input = initTextField();
input.add(new AjaxFormComponentUpdatingBehavior("blur") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
//nothing to do, just update model data
}
});
input.add(new Behavior() {
@Override
public void bind(Component component) {
super.bind(component);
component.add(AttributeModifier.replace("onkeydown",
Model.of("if(event.keyCode == 13) {event.preventDefault();}")));
}
});
input.setOutputMarkupId(true);
add(input);
}
示例3: addOrReplaceEditor
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private void addOrReplaceEditor(WebMarkupContainer inputAce) {
AceEditor editor = new AceEditor(ID_ACE_EDITOR, xmlEditorModel);
editor.setOutputMarkupId(true);
editor.setModeForDataLanguage(dataLanguage);
editor.add(new AjaxFormComponentUpdatingBehavior("blur") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
}
});
inputAce.addOrReplace(editor);
}
示例4: initAssignmentParametersPanel
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
@Override
protected void initAssignmentParametersPanel(){
super.initAssignmentParametersPanel();
relationModel = Model.of(RelationTypes.MEMBER);
DropDownChoicePanel relationSelector = WebComponentUtil.createEnumPanel(RelationTypes.class, ID_RELATION,
WebComponentUtil.createReadonlyModelFromEnum(RelationTypes.class), relationModel, RelationSelectorAssignablePanel.this, false);
relationSelector.getBaseFormComponent().add(new AjaxFormComponentUpdatingBehavior("change") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
}
});
relationSelector.add(new VisibleEnableBehaviour(){
private static final long serialVersionUID = 1L;
@Override
public boolean isEnabled(){
return !ResourceType.COMPLEX_TYPE.equals(typeModel.getObject());
}
});
relationSelector.setOutputMarkupId(true);
relationSelector.setOutputMarkupPlaceholderTag(true);
add(relationSelector);
}
示例5: createOptionsForm
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private Form createOptionsForm(String id) {
final Form options = new AjaxIndicatingForm(id);
final DropDownChoice<SortParam<FieldValuesOrder>> sortSelect
= new FieldValueOrderSelector("sort", new PropertyModel<SortParam<FieldValuesOrder>>(valuesProvider, "sort"));
sortSelect.add(new UpdateOptionsFormBehavior(options));
options.add(sortSelect);
final TextField filterField = new TextField<>("filter", new PropertyModel(filterModel, "name"));
filterField.add(new AjaxFormComponentUpdatingBehavior("keyup") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.add(valuesContainer);
}
});
options.add(filterField);
addOccurenceOptions(options);
return options;
}
示例6: createFilterForm
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
/**
* Creates a form with an input bound to the filter model
*
* @param id component id
* @return filter form
*/
private Form createFilterForm(String id) {
final Form filterForm = new Form(id);
final TextField<String> filterField = new TextField<>("filterText",
new PropertyModel<String>(filterModel, "name"));
// make field update
filterField.add(new AjaxFormComponentUpdatingBehavior("keyup") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
//update values
target.add(valuesContainer);
}
});
filterForm.add(filterField);
return filterForm;
}
示例7: createResultPageSizeForm
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private Form createResultPageSizeForm(String id, final IPageableItems resultsView) {
final Form resultPageSizeForm = new Form(id);
final DropDownChoice<Long> pageSizeDropDown
= new DropDownChoice<Long>("resultPageSize",
// bind to items per page property of pageable
new PropertyModel<Long>(resultsView, "itemsPerPage"),
ITEMS_PER_PAGE_OPTIONS);
pageSizeDropDown.add(new AjaxFormComponentUpdatingBehavior("change") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
onChange(target);
}
});
resultPageSizeForm.add(pageSizeDropDown);
return resultPageSizeForm;
}
示例8: addChartTypeSelect
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private Component addChartTypeSelect() {
this.chartTypeSelect = new DropDownChoice<ChartTypeEnum>("chartTypeSelect", this.chartType, this.chartTypes);
this.chartTypeSelect.setOutputMarkupId(true);
this.chartTypeSelect.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(final AjaxRequestTarget target) {
ChartConfigurationPanel.this.updateAttributes();
ChartConfigurationPanel.this.updateSlider();
target.add(ChartConfigurationPanel.this.attributeSelect);
target.add(ChartConfigurationPanel.this.sliderContainer);
}
});
return this.chartTypeSelect;
}
示例9: addProcessSelect
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private void addProcessSelect(final Form<Void> layoutForm) {
this.processNameList = new ArrayList<String>();
for (final CorrelationProcess process : CorrelationProcess.findAll()) {
this.processNameList.add(process.getName());
}
this.processSelect = new DropDownChoice<String>("processSelect", new Model<String>(), this.processNameList);
this.processSelect.setOutputMarkupId(true);
this.processSelect.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
BPMNMonitoringPanel.this.process = CorrelationProcess.findByName(BPMNMonitoringPanel.this.processSelect.getChoices().get(Integer.parseInt(BPMNMonitoringPanel.this.processSelect.getValue()))).get(0);
BPMNMonitoringPanel.this.createProcessInstanceMonitoringProvider();
target.add(BPMNMonitoringPanel.this.dataTable);
}
});
layoutForm.add(this.processSelect);
}
示例10: addEventTypeDropDown
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private void addEventTypeDropDown() {
final List<String> eventTypes = EapEventType.getAllTypeNames();
if (!eventTypes.isEmpty()) {
eventTypeName = eventTypes.get(0);
}
final DropDownChoice<String> eventTypeDropDownChoice = new DropDownChoice<String>("eventTypeDropDownChoice", new Model<String>(), eventTypes);
eventTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
eventTypeName = eventTypeDropDownChoice.getModelObject();
}
});
if (!eventTypes.isEmpty()) {
eventTypeDropDownChoice.setModelObject(eventTypes.get(0));
}
eventTypeDropDownChoice.setOutputMarkupId(true);
layoutForm.add(eventTypeDropDownChoice);
}
示例11: addProcessSelect
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private void addProcessSelect(final Form<Void> layoutForm) {
this.processSelect = new DropDownChoice<String>("processSelect", new Model<String>(), this.processNameList);
this.processSelect.setOutputMarkupId(true);
this.processSelect.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
final String processValue = SimpleSimulationPanel.this.processSelect.getValue();
if (processValue != null && !processValue.isEmpty()) {
final List<CorrelationProcess> processList = CorrelationProcess.findByName(SimpleSimulationPanel.this.processSelect.getChoices().get(Integer.parseInt(SimpleSimulationPanel.this.processSelect.getValue())));
if (processList.size() > 0) {
SimpleSimulationPanel.this.selectedProcess = processList.get(0);
SimpleSimulationPanel.this.createEventTypeList(SimpleSimulationPanel.this.selectedProcess);
target.add(SimpleSimulationPanel.this.eventTypeSelect);
}
}
SimpleSimulationPanel.this.treeTableProvider.setCorrelationAttributes(SimpleSimulationPanel.this.selectedProcess.getCorrelationAttributes());
}
});
layoutForm.add(this.processSelect);
}
示例12: ProbabilityEntryPanel
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
public ProbabilityEntryPanel(final String id, final int entryId, final SimulationTreeTableProvider<Object> simulationTreeTableProvider) {
super(id);
final Form<Void> form = new Form<Void>("form");
this.textField = new TextField<String>("textFieldID", Model.of(simulationTreeTableProvider.getProbabilityForEntry(entryId)));
this.textField.setOutputMarkupPlaceholderTag(true);
this.textField.setOutputMarkupId(true);
this.textField.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
simulationTreeTableProvider.setProbabilityForEntry(ProbabilityEntryPanel.this.textField.getValue(), entryId);
}
});
form.add(this.textField);
this.add(form);
}
示例13: DerivationTypeDropDownChoicePanel
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
public DerivationTypeDropDownChoicePanel(final String id, final int entryId, final SimulationTreeTableProvider<Object> simulationTreeTableProvider) {
super(id);
final Form<Void> layoutForm = new Form<Void>("layoutForm");
final DropDownChoice<DerivationType> derivationTypeDropDownChoice = new DropDownChoice<DerivationType>("derivationTypeDropDownChoice", Model.of(simulationTreeTableProvider.getDerivationTypeForEntry(entryId)), this.derivationTypes);
derivationTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
simulationTreeTableProvider.setDerivationTypeForEntry(derivationTypeDropDownChoice.getModelObject(), entryId);
if (DerivationTypeDropDownChoicePanel.this.treeTable != null) {
target.add(DerivationTypeDropDownChoicePanel.this.treeTable);
} else {
target.add(DerivationTypeDropDownChoicePanel.this.getPage());
}
}
});
derivationTypeDropDownChoice.setEnabled(true);
layoutForm.add(derivationTypeDropDownChoice);
this.add(layoutForm);
}
示例14: buildTextFields
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private void buildTextFields() {
this.transformationRuleNameTextField = new TextField<String>("transformationRuleNameTextField", new PropertyModel<String>(this, "transformationRuleName"));
this.transformationRuleNameTextField.setOutputMarkupId(true);
this.layoutForm.add(this.transformationRuleNameTextField);
final List<String> eventTypes = EapEventType.getAllTypeNames();
this.eventTypeDropDownChoice = new DropDownChoice<String>("eventTypeDropDownChoice", new PropertyModel<String>(this, "selectedEventTypeName"), eventTypes);
this.eventTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
BasicTransformationRuleEditorPanel.this.updateOnChangeOfDropDownChoice(target);
}
});
this.layoutForm.add(this.eventTypeDropDownChoice);
this.transformationRuleTextArea = new TextArea<String>("transformationRuleTextArea", new PropertyModel<String>(this, "transformationRule"));
this.transformationRuleTextArea.setOutputMarkupId(true);
this.layoutForm.add(this.transformationRuleTextArea);
}
示例15: buildFilterExpressionOperatorDropDownChoice
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; //导入依赖的package包/类
private void buildFilterExpressionOperatorDropDownChoice() {
this.filterExpressionOperator = (FilterExpressionOperatorEnum) this.element.getValue();
final DropDownChoice<FilterExpressionOperatorEnum> filterExpressionOperatorDropDownChoice = new DropDownChoice<FilterExpressionOperatorEnum>("filterExpressionOperatorDropDownChoice", new PropertyModel<FilterExpressionOperatorEnum>(this, "filterExpressionOperator"), Arrays.asList(FilterExpressionOperatorEnum.values()), new ChoiceRenderer<FilterExpressionOperatorEnum>() {
private static final long serialVersionUID = 1L;
@Override
public Object getDisplayValue(final FilterExpressionOperatorEnum element) {
return element.getValue();
}
});
filterExpressionOperatorDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = -5452061293278720695L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
FilterExpressionPanel.this.element.setValue(FilterExpressionPanel.this.filterExpressionOperator);
FilterExpressionPanel.this.table.getSelectedElements().remove(FilterExpressionPanel.this.element);
target.add(FilterExpressionPanel.this.table);
}
});
filterExpressionOperatorDropDownChoice.setOutputMarkupId(true);
this.layoutForm.add(filterExpressionOperatorDropDownChoice);
}