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


Java OnChangeAjaxBehavior类代码示例

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


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

示例1: newAdditionalActions

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
@Override
public WebMarkupContainer newAdditionalActions(String id) {
	WebMarkupContainer actions = new Fragment(id, "actionsFrag", this);
	if (!symbols.isEmpty()) {
		actions.add(new CheckBox("outline", Model.of(isOutlineVisibleInitially())).add(new OnChangeAjaxBehavior() {

			@Override
			protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
				super.updateAjaxAttributes(attributes);
				attributes.setMethod(Method.POST);
			}

			@Override
			protected void onUpdate(AjaxRequestTarget target) {
				toggleOutline(target);
			}
			
		}));
	} else {
		actions.add(new WebMarkupContainer("outline").setVisible(false));
	}
	return actions;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:24,代码来源:SourceViewPanel.java

示例2: initViewSelector

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void initViewSelector(WebMarkupContainer headerPanel){
    DropDownChoice<AssignmentViewType> viewSelect = new DropDownChoice(ID_VIEW_TYPE, viewModel,
            Model.ofList(viewTypeList != null && viewTypeList.size() > 0 ?
                    viewTypeList : createAssignableTypesList()),
            new EnumChoiceRenderer<AssignmentViewType>(this));
    viewSelect.add(new OnChangeAjaxBehavior() {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            if (AssignmentViewType.USER_TYPE.equals(viewSelect.getModelObject())){
                initUserViewSelectionPopup(createStringResource("AssignmentCatalogPanel.selectAssignmentsUserOwner"),
                        target);
            } else {
                searchModel.reset();
                AssignmentCatalogPanel.this.addOrReplaceSearchPanel(getHeaderPanel());
                AssignmentCatalogPanel.this.addOrReplaceLayout(target, getCatalogItemsPanelContainer(), getPageBase());
                target.add(getCatalogItemsPanelContainer());
                target.add(getHeaderPanel());
            }
        }
    });
    viewSelect.setOutputMarkupId(true);
    headerPanel.add(viewSelect);

}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:27,代码来源:AssignmentCatalogPanel.java

示例3: initRoot

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void initRoot() {
    DropDownChoice<LoggingLevelType> rootLevel = new DropDownChoice<>(ID_ROOT_LEVEL,
            new PropertyModel<LoggingLevelType>(getModel(), LoggingDto.F_ROOT_LEVEL),
            WebComponentUtil.createReadonlyModelFromEnum(LoggingLevelType.class));
    rootLevel.add(new EmptyOnChangeAjaxFormUpdatingBehavior());
    add(rootLevel);

    DropDownChoice<String> rootAppender = new DropDownChoice<>(ID_ROOT_APPENDER,
            new PropertyModel<String>(getModel(), LoggingDto.F_ROOT_APPENDER), createAppendersListModel());
    rootAppender.setNullValid(true);
    rootAppender.add(new OnChangeAjaxBehavior() {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            rootAppenderChangePerformed(target);
        }
    });
    rootAppender.add(new EmptyOnChangeAjaxFormUpdatingBehavior());
    add(rootAppender);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:21,代码来源:LoggingConfigPanel.java

示例4: createDropDown

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private <V> DropDownChoice<V> createDropDown(String id, IModel<V> defaultModel, final List<V> values,
		IChoiceRenderer<V> renderer) {
	DropDownChoice<V> listSelect = new DropDownChoice<V>(id, defaultModel,
			new AbstractReadOnlyModel<List<V>>() {
				private static final long serialVersionUID = 1L;

				@Override
				public List<V> getObject() {
					return values;
				}
			}, renderer);

	listSelect.add(new OnChangeAjaxBehavior() {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(AjaxRequestTarget target) {
			refreshTable(target);
		}
	});

	return listSelect;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:24,代码来源:RoleMemberPanel.java

示例5: createValueCheckbox

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private Component createValueCheckbox(final String id, final String targetValue) {
    return new CheckBox(id, new FixedValueSetBooleanSelectionModel(AVAILABILITY_FIELD, availabilityLevels, targetValue, getModel()))
            .add(new OnChangeAjaxBehavior() {

                @Override
                protected void onUpdate(AjaxRequestTarget target) {
                    selectionChanged(target);
                }

                @Override
                protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
                    super.updateAjaxAttributes(attributes);

                    attributes.getAjaxCallListeners().add(new AjaxCallListener()
                            //disable checkboxes while updating via AJAX
                            .onBeforeSend("$('form#availability input').prop('disabled', true);")
                            //re-enable checkboxes afterwards
                            .onDone("$('form#availability input').prop('disabled', false);"));
                }

            });

}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:24,代码来源:AvailabilityFacetPanel.java

示例6: buildExpressionInput

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void buildExpressionInput() {
	this.expressionInput = new AttributeExpressionTextField("expressionInput", new PropertyModel<String>(this, "userDefinedExpression"), this.patternBuilderPanel.getPatternTree()) {
		private static final long serialVersionUID = -5212591175918436633L;

		@Override
		public boolean isEnabled() {
			return AttributeSelectionPanel.this.allComponentsEnabled && AttributeSelectionPanel.this.eventTypeElementDropDownChoice.getModelObject() == null && !AttributeSelectionPanel.this.currentDateUsed;
		}
	};
	this.expressionInput.setOutputMarkupId(true);

	final OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() {
		private static final long serialVersionUID = -5737941362786901904L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			if (AttributeSelectionPanel.this.userDefinedExpression == null) {
				AttributeSelectionPanel.this.attributeIdentifiersAndExpressions.put(AttributeSelectionPanel.this.attributeIdentifier, "");
			} else {
				AttributeSelectionPanel.this.attributeIdentifiersAndExpressions.put(AttributeSelectionPanel.this.attributeIdentifier, AttributeSelectionPanel.this.userDefinedExpression);
			}
		}
	};
	this.expressionInput.add(onChangeAjaxBehavior);
	this.layoutForm.add(this.expressionInput);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:27,代码来源:AttributeSelectionPanel.java

示例7: RepeatPatternOperatorRangePanel

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
public RepeatPatternOperatorRangePanel(final String id, final PatternOperatorElement element, final AdvancedTransformationRuleEditorPanel panel) {
	super(id);

	this.layoutForm = new Form<Void>("layoutForm");

	final RangeElement rangeElement = element.getRangeElement();

	this.matchCount = rangeElement.getLeftEndpoint();

	this.matchCountInput = new TextField<Integer>("matchCountInput", new PropertyModel<Integer>(this, "matchCount"));
	final OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() {
		private static final long serialVersionUID = 2251803290291534439L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			rangeElement.setLeftEndpoint(RepeatPatternOperatorRangePanel.this.matchCount);
			target.add(panel.getAttributeTreePanel().getAttributeTreeTable());
		}
	};
	this.matchCountInput.add(onChangeAjaxBehavior);
	this.matchCountInput.setOutputMarkupId(true);
	this.layoutForm.add(this.matchCountInput);

	this.add(this.layoutForm);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:26,代码来源:RepeatPatternOperatorRangePanel.java

示例8: buildEventTypeAliasInput

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void buildEventTypeAliasInput() {
	final TextField<String> eventTypeAliasInput = new TextField<String>("eventTypeAliasInput", new PropertyModel<String>(this, "alias"));
	eventTypeAliasInput.setOutputMarkupId(true);

	final OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() {
		private static final long serialVersionUID = -1427433442511094442L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			// TODO: make sure that alias does not already exist somewhere
			EventTypeAliasPanel.this.element.setAlias(EventTypeAliasPanel.this.alias);
			target.add(EventTypeAliasPanel.this.panel.getAttributeTreePanel().getAttributeTreeTable());
		}
	};
	eventTypeAliasInput.add(onChangeAjaxBehavior);

	this.layoutForm.add(eventTypeAliasInput);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:19,代码来源:EventTypeAliasPanel.java

示例9: buildLeftHandSideExpressionInput

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void buildLeftHandSideExpressionInput() {

		this.leftHandSideExpression = this.element.getLeftHandSideExpression();

		final AttributeExpressionTextField leftHandSideExpressionInput = new AttributeExpressionTextField("leftHandSideExpressionInput", new PropertyModel<String>(this, "leftHandSideExpression"), this.panel.getPatternTree());
		final OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() {

			private static final long serialVersionUID = 2339672763583311932L;

			@Override
			protected void onUpdate(final AjaxRequestTarget target) {
				FilterExpressionPanel.this.element.setLeftHandSideExpression(FilterExpressionPanel.this.leftHandSideExpression);
			}
		};
		leftHandSideExpressionInput.add(onChangeAjaxBehavior);
		leftHandSideExpressionInput.setOutputMarkupId(true);
		this.layoutForm.add(leftHandSideExpressionInput);
	}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:19,代码来源:FilterExpressionPanel.java

示例10: buildRightHandSideExpressionInput

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void buildRightHandSideExpressionInput() {

		this.rightHandSideExpression = this.element.getRightHandSideExpression();

		this.rightHandSideExpressionInput = new AttributeExpressionTextField("rightHandSideExpressionInput", new PropertyModel<String>(this, "rightHandSideExpression"), this.panel.getPatternTree()) {
			private static final long serialVersionUID = 5931500662562159353L;

			@Override
			public boolean isVisible() {
				return !FilterExpressionPanel.this.isFilterExpressionOperatorWithValues();
			}
		};
		final OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() {
			private static final long serialVersionUID = -4319775721171622640L;

			@Override
			protected void onUpdate(final AjaxRequestTarget target) {
				FilterExpressionPanel.this.element.setRightHandSideExpression(FilterExpressionPanel.this.rightHandSideExpression);
			}
		};
		this.rightHandSideExpressionInput.add(onChangeAjaxBehavior);
		this.rightHandSideExpressionInput.setOutputMarkupId(true);
		this.layoutForm.add(this.rightHandSideExpressionInput);
	}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:25,代码来源:FilterExpressionPanel.java

示例11: buildCriteriaValueInput

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void buildCriteriaValueInput() {
	final AttributeExpressionTextField criteriaValueInput = new AttributeExpressionTextField("criteriaValueInput", new Model<String>(), this.patternTree);
	criteriaValueInput.setOutputMarkupId(true);

	final OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() {
		private static final long serialVersionUID = -5737941362786901904L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			if (criteriaValueInput.getModelObject() == null || criteriaValueInput.getModelObject().trim().isEmpty()) {
				CriteriaValuePanel.this.criteriaAttributesAndValues.remove(CriteriaValuePanel.this.attributeExpression);
			} else {
				CriteriaValuePanel.this.criteriaAttributesAndValues.put(CriteriaValuePanel.this.attributeExpression, criteriaValueInput.getModelObject());
			}
		}
	};
	criteriaValueInput.add(onChangeAjaxBehavior);
	criteriaValueInput.setModelObject(this.criteriaAttributesAndValues.get(this.attributeExpression));

	this.layoutForm.add(criteriaValueInput);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:22,代码来源:CriteriaValuePanel.java

示例12: initPai

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void initPai() {
			
	pai = new EstruturaDropDown("pai",UIUtils.getScopeGroupId()) ;
	
	pai.add(new OnChangeAjaxBehavior() {

		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(AjaxRequestTarget target) {
			recarregaPosicao();
			if (target != null)
				target.addComponent(posicao);
		}
	});
	form.add(pai);
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:18,代码来源:NovaEstruturaPanel.java

示例13: initEixos

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void initEixos() {
	eixos = new EixosDropDown("eixos", UIUtils.getScopeGroupId(),null);
	eixos.add(new OnChangeAjaxBehavior() {

		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(AjaxRequestTarget target) {
			long eixoId = (eixos.getModelObject() != null) ? eixos
					.getModelObject().getEixoId() : 0l;
			propostas.recarregarPropostas(eixoId);
			propostas.setVisible(getPropostasCount(eixoId) != 0);
			propostaVazia.setVisible(!propostas.isVisible());
			if (target != null) {
				target.addComponent(propostaVazia);
				target.addComponent(propostasContainer);
			}

		}
	});
	add(eixos);
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:23,代码来源:GerenciarPropostasPage.java

示例14: initEixos

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
private void initEixos(){
	eixos = new EixosDropDown("eixos", UIUtils.getScopeGroupId(),null);
	eixos.setRequired(true);
	eixos.add(new OnChangeAjaxBehavior() {

		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(AjaxRequestTarget target) {
			recarregarCategoria();
			recarregarTopicos();
			if (target != null){
				target.addComponent(categoria);
				target.addComponent(topicos);
			}	
		}
	});
	if(getModelObject() != null){
		try {
			  eixos.setModelObject(PriorizacaoServiceUtil.getEixo(getModelObject().getEixoId()));
		} catch (Exception e) {
			//Ignore
		} 
	}
	form.add(eixos);
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:27,代码来源:PropostaPage.java

示例15: addCheckBox

import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; //导入依赖的package包/类
@SuppressWarnings("serial")
private void addCheckBox(final DivPanel checkBoxDivPanel, final ICalendarFilter filter, final String property, final String labelKey,
    final String tooltipKey, final boolean autoSubmit)
{
  final CheckBoxButton checkBoxButton = new CheckBoxButton(checkBoxDivPanel.newChildId(), new PropertyModel<Boolean>(filter, property),
      checkBoxDivPanel.getString(labelKey), autoSubmit);
  if (autoSubmit == false) {
    checkBoxButton.getCheckBox().add(new OnChangeAjaxBehavior() {
      @Override
      protected void onUpdate(final AjaxRequestTarget target)
      {
        // Do nothing (the model object is updated).
      }
    });
  }
  if (tooltipKey != null) {
    checkBoxButton.setTooltip(checkBoxDivPanel.getString(tooltipKey));
  }
  checkBoxDivPanel.add(checkBoxButton);
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:21,代码来源:CalendarPageSupport.java


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