Lucas,
With commit [1] I have added AjaxButtons to wiQuery dialog. You can
use them as follow:
HTML AjaxDialogTestPage.html
<html xmlns:wicket>
<body>
<div wicket:id="dialog">
dddldddd!
</div>
</body>
</html>
Java:
public class AjaxDialogTestPage extends WebPage
{
/**
*
*/
private static final long serialVersionUID = 1L;
private Dialog dialog;
private AjaxDialogButton ok;
private AjaxDialogButton cancel;
/**
*
*/
public AjaxDialogTestPage()
{
ok = new AjaxDialogButton("Ok")
{
private static final long serialVersionUID = 1L;
@Override
protected void onButtonClicked(AjaxRequestTarget target)
{
//do your cancel logic here
}
};
cancel = new AjaxDialogButton("Cancel")
{
private static final long serialVersionUID = 1L;
@Override
protected void onButtonClicked(AjaxRequestTarget target)
{
//do your cancel logic here
}
};
dialog = new Dialog("dialog");
dialog.setTitle("Test");
add(dialog);
dialog.setAutoOpen(true);
dialog.setButtons(ok, cancel);
}
}
Hope this helps:-)
Regards,
Ernesto
References
1-http://code.google.com/p/wiquery/source/detail?r=1950
On Tue, Nov 29, 2011 at 2:52 PM, lucast <[email protected]> wrote:
> Dear Forum,
> I want to implement a modal window for confirming the deletion of objects. I
> want to use Jquery confirmation dialog, just like on
> http://jqueryui.com/demos/dialog/modal-confirmation.html this example .
>
> Is there a way to add this Jquery script to my code and to know if the
> delete button has been clicked?
> When I use jQuery widgets, I render them on load from renderHead function
> but I never had to use dialogs.
>
> I thought of using wiQuery's functionality by creating a Dialog object and
> adding DialogButton objects to it.
> But I don't know how to how about adding the necessary code to record that
> the delete button has been clicked.
> I know I need to add the following code to the Dialog object:
> DialogButton deleteButton = new DialogButton("delete", jsScope);
> but I don't know what I should put on jsScope.
>
> I don't want to depend on wiQuery, if learning how to read a value from
> javascript/jquery code gives me more freedom.
>
> Thanks in advance,
> Lucas
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Jquery-Confirmation-Dialog-or-WiQuery-Dialog-tp4119238p4119238.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]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]