OK, so we can omit validation when needed.

That's great (I wasn't aware of such a method), but I don't like "hidden
submit" concept either, it looks more like a workaround rather than a
solution.

I remember from my earlier experience with Tapestry that simply calling
form.submit() without any hidden submit button didn't work. Is that still
the case?



On Tue, Apr 15, 2014 at 12:26 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 14 Apr 2014 09:39:33 -0300, Chris Poulsen <mailingl...@nesluop.dk>
> wrote:
>
>  I dont think onSuccess is called if validation fails, perhaps one could
>> adjust the outcome of the validation phase of the form like suggested.
>>
>
> Yeah, I just noticed that after I posted the message, and you're right
> about the validation phase (specifically of the form) being the right place
> for putting that code. Thanks for pointing this! :)
>
>
>
>>
>> On Mon, Apr 14, 2014 at 2:19 PM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>>
>>  On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko <
>>> ilya.obsha...@gmail.com>
>>> wrote:
>>>
>>>  - if we trigger form submission (it's possible to do that using hidden
>>>
>>>> submit, it's not very elegant, but it works), we have to go through form
>>>> validation which fails in most cases because at this point form is not
>>>> yet completed; user receives non-relevant validation errors
>>>>
>>>>
>>> Please try this:
>>>
>>> @Environmental
>>> private ValidationTracker validationTracker;
>>>
>>> public void onSuccess() {
>>>         if (notReallyValidationNow) { // submission from autocomplete
>>>                 validationTracker.clear(); // all validation errors are
>>> dropped
>>>         }
>>> }
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Tapestry, Java and Hibernate consultant and developer
>>> http://machina.com.br
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Ilya Obshadko

Reply via email to