Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-21 Thread Matthew Young
Thank you Igor for showing me this. Wow, so much new stuff for me in there. I'll dig in and try to understand it all. On Thu, Mar 20, 2008 at 3:54 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: in a real app people will be invested in fixing the issue and not having someone else do their

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
On Wed, Mar 19, 2008 at 10:54 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: yes. there is a phase of processing that goes through and collects the feedback messages. you are reporting the error after that phase most likely, so it will get picked up next request. i wonder if calling

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
Don't know what happen to my last reply. Try again: i wonder if calling feedbackpanel.detach() will help before you add it to the ajax request target... No, this doesn't make the message show up either. yes. there is a phase of processing that goes through and collects the feedback messages.

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young [EMAIL PROTECTED] wrote: Small wish: in GMail, when their Ajax submit fails (either user submit or auto background submit), they don't go to a new page, they flash a message System error, trying again. It would be great if Wicket can support

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matej Knopp
It depends on the kind of error. Sometimes when it's xmlhttprequest error we get no notification of it. -Matej On Thu, Mar 20, 2008 at 9:21 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young [EMAIL PROTECTED] wrote: Small wish: in GMail, when their

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matej Knopp
This doesn't work because the model.getObject method is only called when the value is pulled out of the model, which is on label render. Even if you refresh it on ajax request, it might be too late because the feedback panel retrieves the feedback messages in onBeforeRender (before actual

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
add an iajaxcalldecorator override failed script Would that work if failure happen late in rendering? By that time, Wicket would be on the onSuccess path, right? For my Wicket education: I notice the IAjaxCallDecorator callbacks are only called once. So are these for fixed static script only?

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
why would it be onsuccess path? this is something that runs clientside... they are executed every time the component rendered, and no you shouldnt touch ajaxreqesttarget from a call decorator, notice how it is not passed in... -igor On Thu, Mar 20, 2008 at 2:38 PM, Matthew Young [EMAIL

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
Then what? In real app, the model is calling some flakey remote service that can fail. Is there no way to show error message on the same page? That the only thing is put up a different error page? On Thu, Mar 20, 2008 at 1:29 PM, Matej Knopp [EMAIL PROTECTED] wrote: This doesn't work because

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
they are executed every time the component rendered That's true for non-Ajax, but if Ajax, it's not called again. It make sense to me because the form is not rendered. no you shouldnt touch ajaxreqesttarget from a call decorator I don't mean in the decorator. I mean in the

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
decorator generates scripts that execute on the client side. so onfailure() is a handler that will be executed by clientside javascript if ajax request fails, it has nothing to do with button.onerror() -igor On Thu, Mar 20, 2008 at 2:54 PM, Matthew Young [EMAIL PROTECTED] wrote: they are

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
in a real app people will be invested in fixing the issue and not having someone else do their homework for them :) like i said, right now we consider errors in models unrecoverable - eg you go to an error page. seemed to satisfy everyone for 3? years that wicket has been out. that said, you can

How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-19 Thread Matthew Young
I register an error to the page in the model but the feedback message doesn't show in FeedbackPanel. Only the error message register in onSubmit() event handler shows. Please have a look. Thanks! HomePage.html: html head/head span wicket:id=messagemessage will be here/span form

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-19 Thread Igor Vaynberg
im thinking it might be too late at that point to register the messages because the feedback panel might have already rendered... perhaps instead of using a loadable detachable model you do something like this: class mypage { private List result; onbeforerender() { try {

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-19 Thread Matthew Young
Hi Igor, Overriding onBeforeRender() doesn't work on Ajax, it's not called :( Is there anyway to handle this kind of error condition for both Ajax and non-Ajax? Having to abandon LoadableDeachableModel is a pity. The code is much clearer with LoadableDeachableModel. Anyway, does Wicket have

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-19 Thread Igor Vaynberg
On Wed, Mar 19, 2008 at 5:54 PM, Matthew Young [EMAIL PROTECTED] wrote: Hi Igor, Overriding onBeforeRender() doesn't work on Ajax, it's not called :( it is, but only on components that get updated via ajax...so you might want to move the code to one of those... Is there anyway to handle

Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-19 Thread Igor Vaynberg
yes. there is a phase of processing that goes through and collects the feedback messages. you are reporting the error after that phase most likely, so it will get picked up next request. i wonder if calling feedbackpanel.detach() will help before you add it to the ajax request target... -igor