本文整理了Java中org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior.updateAjaxAttributes()
方法的一些代码示例,展示了AjaxFormComponentUpdatingBehavior.updateAjaxAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AjaxFormComponentUpdatingBehavior.updateAjaxAttributes()
方法的具体详情如下:
包路径:org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior
类名称:AjaxFormComponentUpdatingBehavior
方法名:updateAjaxAttributes
暂无
代码示例来源:origin: org.opensingular/singular-form-wicket
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
//if (validateOnly)
// attributes.getExtraParameters().put("forceDisableAJAXPageBlock", true);
}
代码示例来源:origin: org.opensingular/form-wicket
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
//if (validateOnly)
// attributes.getExtraParameters().put("forceDisableAJAXPageBlock", true);
}
代码示例来源:origin: apache/wicket
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
AjaxCheckBox.this.updateAjaxAttributes(attributes);
}
代码示例来源:origin: org.apache.wicket/wicket-core
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
AjaxCheckBox.this.updateAjaxAttributes(attributes);
}
代码示例来源:origin: org.apache.wicket/wicket-core
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
attributes.setSerializeRecursively(true);
attributes.getAjaxCallListeners().add(new AjaxCallListener()
{
private static final long serialVersiOnUID= 1L;
@Override
public CharSequence getPrecondition(Component component)
{
return String.format("return attrs.event.target.name === '%s'", getFormComponent().getInputName());
}
});
}
代码示例来源:origin: apache/wicket
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
attributes.setSerializeRecursively(true);
attributes.getAjaxCallListeners().add(new AjaxCallListener()
{
private static final long serialVersiOnUID= 1L;
@Override
public CharSequence getPrecondition(Component component)
{
return String.format("return attrs.event.target.name === '%s'", getFormComponent().getInputName());
}
});
}
代码示例来源:origin: apache/wicket
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
Component compOnent= getComponent();
// textfiels and textareas will trigger this behavior with either 'inputchange' or 'change' events
// all the other components will use just 'change'
if (!(component instanceof TextField || component instanceof TextArea))
{
attributes.setEventNames(EVENT_CHANGE);
}
}
代码示例来源:origin: org.opensingular/singular-wicket-utils
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
if (updateAjaxAttributes != null) {
updateAjaxAttributes.accept(getComponent(), attributes);
}
}
代码示例来源:origin: org.apache.wicket/wicket-core
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
Component compOnent= getComponent();
// textfiels and textareas will trigger this behavior with either 'inputchange' or 'change' events
// all the other components will use just 'change'
if (!(component instanceof TextField || component instanceof TextArea))
{
attributes.setEventNames(EVENT_CHANGE);
}
}
代码示例来源:origin: org.opensingular/wicket-utils
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
if (updateAjaxAttributes != null) {
updateAjaxAttributes.accept(getComponent(), attributes);
}
}
代码示例来源:origin: webanno/webanno
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
super.updateAjaxAttributes(attributes);
IAjaxCallListener listener = new AjaxCallListener()
{
private static final long serialVersiOnUID= -7968540662654079601L;
@Override
public CharSequence getPrecondition(Component component)
{
return "var keycode = Wicket.Event.keyCode(attrs.event); return true;";
}
};
attributes.getAjaxCallListeners().add(listener);
attributes.getDynamicExtraParameters().add("var eventKeycode = Wicket.Event" +
".keyCode(attrs.event);return {keycode: eventKeycode};");
attributes.setPreventDefault(false);
}
代码示例来源:origin: webanno/webanno
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes aAttributes)
{
super.updateAjaxAttributes(aAttributes);
// When focus is on a feature editor and the user selects a new annotation,
// there is a race condition between the saving the value of the feature
// editor and the loading of the new annotation. Delay the feature editor
// save to give preference to loading the new annotation.
aAttributes.setThrottlingSettings(new ThrottlingSettings(getMarkupId(),
Duration.milliseconds(250), true));
aAttributes.getAjaxCallListeners().add(new AjaxCallListener()
{
private static final long serialVersiOnUID= 1L;
@Override
public CharSequence getPrecondition(Component aComponent)
{
// If the panel refreshes because the user selects a new annotation,
// the annotation editor panel is updated for the new annotation
// first (before saving values) because of the delay set above. When
// the delay is over, we can no longer save the value because the
// old component is no longer there. We use the markup id of the
// editor fragments to check if the old component is still there
// (i.e. if the user has just tabbed to a new field) or if the old
// component is gone (i.e. the user selected/created another
// annotation). If the old component is no longer there, we abort
// the delayed save action.
return "return $('#" + aFrag.getMarkupId() + "').length > 0;";
}
});
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-layer-docmetadata
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes aAttributes)
{
super.updateAjaxAttributes(aAttributes);
// When focus is on a feature editor and the user selects a new annotation,
// there is a race condition between the saving the value of the feature
// editor and the loading of the new annotation. Delay the feature editor
// save to give preference to loading the new annotation.
aAttributes.setThrottlingSettings(new ThrottlingSettings(getMarkupId(),
Duration.milliseconds(250), true));
aAttributes.getAjaxCallListeners().add(new AjaxCallListener()
{
private static final long serialVersiOnUID= 1L;
@Override
public CharSequence getPrecondition(Component aComponent)
{
// If the panel refreshes because the user selects a new annotation,
// the annotation editor panel is updated for the new annotation
// first (before saving values) because of the delay set above. When
// the delay is over, we can no longer save the value because the
// old component is no longer there. We use the markup id of the
// editor fragments to check if the old component is still there
// (i.e. if the user has just tabbed to a new field) or if the old
// component is gone (i.e. the user selected/created another
// annotation). If the old component is no longer there, we abort
// the delayed save action.
return "return $('#" + aFrag.getMarkupId() + "').length > 0;";
}
});
}
代码示例来源:origin: inception-project/inception
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes aAttributes)
{
super.updateAjaxAttributes(aAttributes);
// When focus is on a feature editor and the user selects a new annotation,
// there is a race condition between the saving the value of the feature
// editor and the loading of the new annotation. Delay the feature editor
// save to give preference to loading the new annotation.
aAttributes.setThrottlingSettings(new ThrottlingSettings(getMarkupId(),
Duration.milliseconds(250), true));
aAttributes.getAjaxCallListeners().add(new AjaxCallListener()
{
private static final long serialVersiOnUID= 1L;
@Override
public CharSequence getPrecondition(Component aComponent)
{
// If the panel refreshes because the user selects a new annotation,
// the annotation editor panel is updated for the new annotation
// first (before saving values) because of the delay set above. When
// the delay is over, we can no longer save the value because the
// old component is no longer there. We use the markup id of the
// editor fragments to check if the old component is still there
// (i.e. if the user has just tabbed to a new field) or if the old
// component is gone (i.e. the user selected/created another
// annotation). If the old component is no longer there, we abort
// the delayed save action.
return "return $('#" + aFrag.getMarkupId() + "').length > 0;";
}
});
}