I do this in my app. I open a modal window and when you hit save I open another modal window to confirm your save and if you confirm I close both modal windows.
modalConfirm.close(target);
modalSelectDate.close(target);
IndicatingAjaxLink<Void> btnConfirmSave = new
IndicatingAjaxLink<Void>("btnConfirmSave") {
@Override
protected IAjaxCallDecorator
getAjaxCallDecorator() {
return new
AjaxPostprocessingCallDecorator(super.getAjaxCallDecorator()) {
private static final long
serialVersionUID = 1L;
@Override
public CharSequence
postDecorateScript(CharSequence script) {
return script +
"this.disabled = true; this.style.display =
\"none\";";
}
@Override
public CharSequence
postDecorateOnSuccessScript(CharSequence script) {
return script + "
this.disabled = false;";
}
};
}
@Override
public void onClick(AjaxRequestTarget target) {
if (target != null) {
for (Positions position :
positions) {
position.setVolunteersByFkVolunteerScheduled(session.getVolunteers());
positionsDAO.save(position);
}
// wmc.setVisible(false);
target.addComponent(wmc);
modalConfirm.close(target);
modalSelectDate.close(target);
}
}
};
btnConfirmSave.setOutputMarkupId(true);
btnConfirmSave.setMarkupId("buttonConfirmOK");
add(btnConfirmSave);
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Model-window-issue-tp3727688p3727987.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
