I take it you're using Wicket 6.x since the feedback messages have been
moved all the way to the Component's metadata rather than the session.
Hence the same component should be part of the page if you want to see its
feedback message.

See:
https://cwiki.apache.org/WICKET/migration-to-wicket-60.html#MigrationtoWicket6.0-FeedbackStorageRefactoring

Create a user session and register the messages against it:

@Override
public void onSubmit() {
    User user = service.authenticate(loginUser.getEmail(),
loginUser.getPassword().getClearText());
    if(user == null) {
        Session.get().error("Invalid login!"));
    }
    ...
    else { // authentication okay
        setResponsePage(getApplication().getHomePage());
        ...
    }
}

~ Thank you,
   Paul Bors



On Mon, May 13, 2013 at 2:17 PM, dhongyt <[email protected]> wrote:

> Hey guys,
>
> I had a feedback panel within a form and want to display an error onSubmit
> when there is a authentication issue.
>
> When I call error when they fail to log in the error does not display.
>
>
> However if I comment out the onSubmit code and call error, it displays.
> Why does it not display when the error is called within the else?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Feedback-within-Form-Weird-Issue-tp4658757.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]
>
>

Reply via email to