class alert extends abstractbehavior { boolean istemporary() { return false; } void renderhead(iheaderresponse r) { renderonloadjavascript("alert('error!');"); } }
form searchform=new form(...) { onerror() { add(new alert(); } } -igor On 8/2/07, Federico Fanton <[EMAIL PROTECTED]> wrote: > > Hi everyone! > I'm sorry, I'm looking for a way to show an alert dialog when a condition > is met.. For example, the user fills in a "search form", submits it and if > there's no data matching the query, a "no data found!" should pop up.. I'd > like to use something like the "alert" JavaScript function, but I'm a bit > confused about where to put it.. ^^; > Should I load the relevant information (wether there's data or not from > the query) in a certain component and then look it up from an "onLoad" > function that would show the alert accordingly? Is there a "Wicket way" to > do this? > Many thanks for your time! > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > IMPORTANT NOTICE: > > This mailing list is shutting down. Please subscribe to the Apache Wicket > user list. Send a message to: "users-subscribe at wicket.apache.org" and > follow the instructions. > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ IMPORTANT NOTICE: This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: "users-subscribe at wicket.apache.org" and follow the instructions. _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user