Here is a pretty simple example. Link myLink = new Link("myLink");
myLink.add(new AttributeModifier( "onclick", true, new Model("javascript:callAlert()")); -Craig Huergo Perez wrote: > > What attribute of the Link should I modify with an attribute modifier? > I could not find any examples of this functionality. > > Also, I found the IAjaxCallDecorator interface. Could it be used to > display an alert after receiving an AJAX response? > > Thanks! > Huergo > > Nino Saturnino Martinez Vazquez Wael wrote: >> use a attribute modifier and a behavior for this.. >> >> Huergo Perez wrote: >> >>> Hi All, >>> >>> I need to implement a functionality that in certain cases displays a >>> JavaScript alert dialog after a click on a link. >>> >>> For example, a table of records may contain a [Delete] link against each >>> record. When a user clicks on the link, the onClick handler attempts to >>> delete the record, and in case of failure (e.g. due to integrity >>> constraint violations) displays a JavaScript alert. >>> >>> What are the suggested ways to implement such a functionality for both >>> AJAX and non-AJAX links? >>> >>> Thanks! >>> Huergo >>> >>> ------------------------------------------------------------------------- >>> 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 >> >> > > > ------------------------------------------------------------------------- > 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 > > -- View this message in context: http://www.nabble.com/Displaying-a-JavaScript-alert-after-a-click-on-a-link-tf3851561.html#a10913973 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