You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by smoothe19 <sa...@justassociates.com> on 2015/06/08 21:08:31 UTC
Modifying the message contents of a MessageDialog
//Dialog associated with a save button
Dialog = new MessageDialog("Dialog", "Warning", "Message contents
here",
DialogButtons.OK, DialogIcon.WARN) {
public void onClose(AjaxRequestTarget target, DialogButton
button) {
if (button != null && button.match(LBL_OK)) {
target.prependJavaScript("return saveClick()");
saveButton.add(new AttributeModifier("onclick", "return
saveClick()"));
target.add(saveButton);
//note: predefined button text are:
//LBL_OK, LBL_CANCEL, LBL_YES, LBL_NO, LBL_CLOSE,
LBL_SUBMIT
}
}
};
add(Dialog);
Now before I show the dialog using Dialog.open(target)
is there a way i can update the contents of the dialog?
java java-ee wicket
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modifying-the-message-contents-of-a-MessageDialog-tp4671101.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Modifying the message contents of a MessageDialog
Posted by Martin Grigorov <mg...@apache.org>.
http://stackoverflow.com/a/30717204/497381
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Mon, Jun 8, 2015 at 10:08 PM, smoothe19 <sa...@justassociates.com>
wrote:
> //Dialog associated with a save button
> Dialog = new MessageDialog("Dialog", "Warning", "Message contents
> here",
> DialogButtons.OK, DialogIcon.WARN) {
> public void onClose(AjaxRequestTarget target, DialogButton
> button) {
> if (button != null && button.match(LBL_OK)) {
> target.prependJavaScript("return saveClick()");
> saveButton.add(new AttributeModifier("onclick", "return
> saveClick()"));
> target.add(saveButton);
> //note: predefined button text are:
> //LBL_OK, LBL_CANCEL, LBL_YES, LBL_NO, LBL_CLOSE,
> LBL_SUBMIT
> }
> }
> };
>
>
> add(Dialog);
> Now before I show the dialog using Dialog.open(target)
>
> is there a way i can update the contents of the dialog?
>
> java java-ee wicket
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Modifying-the-message-contents-of-a-MessageDialog-tp4671101.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>