You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Anthony J Webster <aw...@tentelemed.com> on 2007/09/03 17:04:56 UTC

Houdini FeedBackPanel Problem

Hello,

I'm having some trouble with FeedbackPanel. I have an ajax validated form and submit button. Whenever a component looses focus it and the others are validated and if there are errors these are displayed in the single feedbackpanel abover the form. This works fine however I have a problem when submitting with my AjaxButton. There is a lengthy method call in AjaxButton#onSubmit() which (as it contacts other servers) mail fail. If an exception in thrown I call error() in order to show the user that the submission process has failed. This call works, however most of the time I only see the error message for a split second. When I submit by pressing enter it seems to work OK.

I think his has something to do with the componenet focus and have been trying to decern a pattern in this behaviour but so far despite numerous re-workings the feedbackpanel behaviour remains the same.

I have uploaded a small quickstart project demonstrating this problem over at http://www.transcendenz.co.uk/quickstart.zip and I would be most grateful if someone with greater Wicket knowledge than I could have a quick look and tell me what I'm doing wrong.

Many thanks in advance,

Anthony

Re: Houdini FeedBackPanel Problem

Posted by Anthony J Webster <aw...@tentelemed.com>.
D'oh. Ignore the javascript. I was testing sometning and it would seem I 
forgot to remove it all before uploading the quickstart.

Is there a way I can register my error as a regular validation error from 
the onSubmit()? Or somehow deactivate the validation behaviour until after 
the submission error is displayed...

Thanks

Anthony

----- Original Message ----- 
From: "Matej Knopp" <ma...@gmail.com>
To: <us...@wicket.apache.org>
Sent: Monday, September 03, 2007 5:17 PM
Subject: Re: Houdini FeedBackPanel Problem


> Hi,
>
> there are multiple problems with your code. First you have
>    <script type="text/javascript">
>      document.getElementById('a').
>    </script>
> In your page's header. That's a javascript error (trailing .).
>
> Also you've attached validating behavior in onblur. That's the behavior 
> that
> clears feedback from your panel. Your problem is that the error message is
> registered only during onSubmit(), but not during regular validaiton. In
> wicket, all validation message sare supposed to be displayed only once. So
> when you submit your form, the message is registered, and if after that 
> for
> any reason onblur is triggered, it clears your message.
>
> -Matej
>
>
> On 9/3/07, Anthony J Webster <aw...@tentelemed.com> wrote:
>>
>> Hello,
>>
>> I'm having some trouble with FeedbackPanel. I have an ajax validated form
>> and submit button. Whenever a component looses focus it and the others 
>> are
>> validated and if there are errors these are displayed in the single
>> feedbackpanel abover the form. This works fine however I have a problem 
>> when
>> submitting with my AjaxButton. There is a lengthy method call in
>> AjaxButton#onSubmit() which (as it contacts other servers) mail fail. If 
>> an
>> exception in thrown I call error() in order to show the user that the
>> submission process has failed. This call works, however most of the time 
>> I
>> only see the error message for a split second. When I submit by pressing
>> enter it seems to work OK.
>>
>> I think his has something to do with the componenet focus and have been
>> trying to decern a pattern in this behaviour but so far despite numerous
>> re-workings the feedbackpanel behaviour remains the same.
>>
>> I have uploaded a small quickstart project demonstrating this problem 
>> over
>> at http://www.transcendenz.co.uk/quickstart.zip and I would be most
>> grateful if someone with greater Wicket knowledge than I could have a 
>> quick
>> look and tell me what I'm doing wrong.
>>
>> Many thanks in advance,
>>
>> Anthony
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Houdini FeedBackPanel Problem

Posted by Matej Knopp <ma...@gmail.com>.
Hi,

there are multiple problems with your code. First you have
    <script type="text/javascript">
      document.getElementById('a').
    </script>
In your page's header. That's a javascript error (trailing .).

Also you've attached validating behavior in onblur. That's the behavior that
clears feedback from your panel. Your problem is that the error message is
registered only during onSubmit(), but not during regular validaiton. In
wicket, all validation message sare supposed to be displayed only once. So
when you submit your form, the message is registered, and if after that for
any reason onblur is triggered, it clears your message.

-Matej


On 9/3/07, Anthony J Webster <aw...@tentelemed.com> wrote:
>
> Hello,
>
> I'm having some trouble with FeedbackPanel. I have an ajax validated form
> and submit button. Whenever a component looses focus it and the others are
> validated and if there are errors these are displayed in the single
> feedbackpanel abover the form. This works fine however I have a problem when
> submitting with my AjaxButton. There is a lengthy method call in
> AjaxButton#onSubmit() which (as it contacts other servers) mail fail. If an
> exception in thrown I call error() in order to show the user that the
> submission process has failed. This call works, however most of the time I
> only see the error message for a split second. When I submit by pressing
> enter it seems to work OK.
>
> I think his has something to do with the componenet focus and have been
> trying to decern a pattern in this behaviour but so far despite numerous
> re-workings the feedbackpanel behaviour remains the same.
>
> I have uploaded a small quickstart project demonstrating this problem over
> at http://www.transcendenz.co.uk/quickstart.zip and I would be most
> grateful if someone with greater Wicket knowledge than I could have a quick
> look and tell me what I'm doing wrong.
>
> Many thanks in advance,
>
> Anthony