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 <[EMAIL PROTECTED]> 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