Re: Feedback within Form Weird Issue
I solved the issue. I was invalidating my session before it could display. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Feedback-within-Form-Weird-Issue-tp4658757p4658797.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback within Form Weird Issue
Thanks I will try both things. I believe my pages are stateful. Maybe its because I create an ErrorFeedback that extends the Feedback and didn't override some classes needed. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Feedback-within-Form-Weird-Issue-tp4658757p4658788.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback within Form Weird Issue
Try with binding the session. Maybe you run in stateless mode. Session session = getSession(); session.bind(); session.error(...); On Mon, May 13, 2013 at 11:08 PM, dhongyt wrote: > Weird, it still does not show up. > I do have a function that gets the session and register the error to it. > > Can the feedback be apart of the form? I have tried it outside the form > with > no luck either. > > > > I also changed my onSubmit to use session; > > > > It doesn't need to call the error function before the setResponsePage does > it? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Feedback-within-Form-Weird-Issue-tp4658757p4658767.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov Wicket Training & Consulting http://jWeekend.com <http://jweekend.com/>
RE: Feedback within Form Weird Issue
Even better, create a quick start for yourself and see what you're doing wrong :) ~ Thank you, Paul Bors -Original Message- From: Paul Bors [mailto:p...@bors.ws] Sent: Monday, May 13, 2013 5:26 PM To: users@wicket.apache.org Subject: RE: Feedback within Form Weird Issue setResponsePage() would render either a page from the page map if you give it an instance or build a new page if you give it the Class name. Did you filter out the errors from the feedback and did you added the feedback panel to the page? Refer to section 10.2.2 "Displaying feedback messages and filtering them" of the wicket user guide: http://wicket.apache.org/learn/books/freeguide.html ~ Thank you, Paul Bors -Original Message- From: dhongyt [mailto:davidhtr...@gmail.com] Sent: Monday, May 13, 2013 5:09 PM To: users@wicket.apache.org Subject: Re: Feedback within Form Weird Issue Weird, it still does not show up. I do have a function that gets the session and register the error to it. Can the feedback be apart of the form? I have tried it outside the form with no luck either. I also changed my onSubmit to use session; It doesn't need to call the error function before the setResponsePage does it? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Feedback-within-Form-Weird-Issue- tp4658757p4658767.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Feedback within Form Weird Issue
setResponsePage() would render either a page from the page map if you give it an instance or build a new page if you give it the Class name. Did you filter out the errors from the feedback and did you added the feedback panel to the page? Refer to section 10.2.2 "Displaying feedback messages and filtering them" of the wicket user guide: http://wicket.apache.org/learn/books/freeguide.html ~ Thank you, Paul Bors -Original Message- From: dhongyt [mailto:davidhtr...@gmail.com] Sent: Monday, May 13, 2013 5:09 PM To: users@wicket.apache.org Subject: Re: Feedback within Form Weird Issue Weird, it still does not show up. I do have a function that gets the session and register the error to it. Can the feedback be apart of the form? I have tried it outside the form with no luck either. I also changed my onSubmit to use session; It doesn't need to call the error function before the setResponsePage does it? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Feedback-within-Form-Weird-Issue- tp4658757p4658767.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback within Form Weird Issue
Weird, it still does not show up. I do have a function that gets the session and register the error to it. Can the feedback be apart of the form? I have tried it outside the form with no luck either. I also changed my onSubmit to use session; It doesn't need to call the error function before the setResponsePage does it? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Feedback-within-Form-Weird-Issue-tp4658757p4658767.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback within Form Weird Issue
Hi, You need to use session.error() instead. Since you use setResponsePage(...) the error associated with the Form component is never used. On Mon, May 13, 2013 at 8:17 PM, dhongyt 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: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov Wicket Training & Consulting http://jWeekend.com <http://jweekend.com/>
Re: Feedback within Form Weird Issue
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 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: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Feedback within Form Weird Issue
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: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org