You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sergej Logish <s....@gmail.com> on 2009/05/29 11:13:47 UTC

How to find out that component is being updated by AjaxFormComponentUpdatingBehavior?

Hello community!

I have created component, which supports code input by which it then finds
corresponding value in DB and shows it's name (clasifier).
If user clears code and leaves input component,
AjaxFormComponentUpdatingBehavior takes it's turn and removes previously
fetched
label (if any).
The problem is, that removing current value is a *valid* operation even if
component itself is marked as *required*. So, in order to correctly
process component update I need to know, if this AJAX request is this single
component update or entire form submit (which also could
be AJAX request).
I just didn't find any good solution yet. Currently I just always return *true
*from overriden* checkRequired()* method in case of AJAX request.
But if entire form, were component resides, will be submitted via AJAX,
"required" validation will be just bypassed... That's not good.

Thanks in advance for any advices!