add(new feedbackpanel("feedback")); onsubmit() { user u=authenticator.auth(username, password); if (u==null) { error("Invalid password"); } else { if (!continuetooriginaldestination) { setresponsepage(application.get().gethomepage()); } } }
-igor On Mon, Nov 3, 2008 at 8:02 PM, Graeme Knight <[EMAIL PROTECTED]> wrote: > > Hi. > > Loving Wicket so far! I had a search and had trouble finding the answer to > this one, if anyone can help: > > 1) I have a simple form with username/password and a submit button. > > 2) User enters username/password and hits submit. > > 3) onSubmit authenticates against the database through a load on a > LoadableDetachableModel, and returns the result as the model's object. > > Let's say there is an error on authenticating against the database - what is > the easiest way of giving the user feedback that his username/password was > wrong? I naively thought I might be able to do some sort of conditional > insert of a component into the page or form (similar to Tapestry). > > My solution was then to add a panel (regular not feedback) to the page which > consists of an error icon and a custom message. I would like to update this > component on the re-render so it doesn't display if there isn't a problem, > but it does if there is a problem (couldn't get isVisible working this way). > > What's the Wicket way? > > Many thanks, Graeme. > -- > View this message in context: > http://www.nabble.com/Feedback-Error-message.-tp20315444p20315444.html > Sent from the Wicket - User 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]