I have such things in my Java code:
//...omitted some not revelant code
AjaxIndicatorAppender indicator = new AjaxIndicatorAppender();
final RequiredTextField<String> nickField = new RequiredTextField<String>( "nick", new PropertyModel<String>( this, "nickValue" ) );
formContainer.add( nickField );
indicator.bind(nickField);
nickField.add( new MyValidatingBehaviour( (Form) formContainer, "onkeyup", Duration.ONE_SECOND, indicator ) );
//...
private class MyValidatingBehaviour extends AjaxFormValidatingBehavior implements IAjaxIndicatorAware
{
AjaxIndicatorAppender indicator;
private MyValidatingBehaviour( Form<?> form, String event, final Duration throttleDelay, AjaxIndicatorAppender indicator )
{
super( form, event );
this.setThrottleDelay( throttleDelay );
this.indicator = indicator;
}
@Override
public String getAjaxIndicatorMarkupId()
{
return indicator.getMarkupId();
}
}
但没有发生,没有任何指标,我是否做过错? 能够找到我的事例