i dont know if we should provide javascript wrappers for such things, we are
after all a serverside framework :)
but what you want should be easy:
SubmitLink delete=new SubmitLink("delete") {
onclick() { delete(); }
oncomponenttag(tag) {
super.oncomponenttag(tag);
String onclick=tag.getattributes().get("onclick");
onclick="if (!confirm('are you sure you want to delete '+counter+'
users?")) return false; "+onclick;
tag.getattributes().put("onclick",onclick);
}
if you do this all over the place you can either create a subclass of
submitlink or factor out oncomponenttag changes into an attributemodifier
-igor
On 4/20/07, Decebal Suiu <[EMAIL PROTECTED]> wrote:
Thanks Igor.
I'm not a javascript developer and I come from swing. It is nice to have
in
wicket some methods that encapsulates javascript basic functions (alert,
confirm, ...). In my case, in onClick method I have the selected rows
number
and I wish to call a confirm method (something like confirm("Remove X
users
?"):boolean) before delete the selected users.
--
View this message in context:
http://www.nabble.com/AjaxLink%2C-mass-delete-and-javascript-confirmation-tf3611720.html#a10093103
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user