I am not familiar with wicket.. please help to give me suggestion for How
to implement this?
1. click a button and show a confirm message.
2. suspend 1 minute
3. submit the form..
public ActivityAjaxButton(final ButtonForm form, SessionBean
sessionBean, String id, int seqRequest, String rootSrc) {
super(id, form);
this.form = form;
this.seqRequest = seqRequest;
this.rootSrc = rootSrc;
this.setModel(new Model(sessionBean));
add(new AjaxFormSubmitBehavior(form, "onclick") {
private static final long serialVersionUID = 1L;
protected void onSubmit(AjaxRequestTarget target){
target.appendJavascript("alert('Sumibt
Successfully')");
ActivityAjaxButton.this.onSubmit(target, form);
}
protected void onError(AjaxRequestTarget target){
ActivityAjaxButton.this.onError(target, form);
}
protected CharSequence getEventHandler(){
return new AppendingStringBuffer
(super.getEventHandler()).append("; return false;");
}
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return
ActivityAjaxButton.this.getAjaxCallDecorator
();
}
public CharSequence getCallbackUrl(){
return Utils.generateUrl(this, null,
getComponent
(), useRelativeUrls);
}
}.setThrottleDelay(Duration..ONE_MINUTE));
.........
protected void onSubmit(AjaxRequestTarget target, Form form) {
SessionBean sessionBean = (SessionBean)getModelObject();
modelChanging();
doNavigate(sessionBean, seqRequest, target);
modelChanged();
}
........
}
Best Regards,
Joan Wang
Best Regards,
BSID/ERP
Joan Wang 王琇緯
---------------------------------------------------------------------------
TSMC PROPERTY
This email communication (and any attachments) is proprietary information
for the sole use of its
intended recipient. Any unauthorized review, use or distribution by anyone
other than the intended
recipient is strictly prohibited. If you are not the intended recipient,
please notify the sender by
replying to this email, and then delete this email and any copies of it
immediately. Thank you.
---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]