Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

Re: prevent multiple form submits

Lenny Primak

2012-01-28

Replies: Find Java Web Hosting

Author LoginPost Reply
Sounds like a bug although I don't understand yet why it would not work. Please open an issue.



On Jan 27, 2012, at 10:11 PM, Yohan Yudanara <yohan.yudanara@(protected):

> Thank you for your fast reply :)
>
> First, I want to say sorry because I'm copy pasting your
> DisableAfterSubmit.java and DisableAfterSubmit.js.
> When I was trying to use whole flowlogix library, I have difficulties fix
> my pom.xml because many dependencies required by flowlogix when I run "mvn
> jetty:run".
>
> Ok, back to the topic.. :)
> Yup, the popup validation is not showing up when I clicked submit button.
> The popup only shown when I move away from text field.
>
> I've try with simple page:
> <t:form>
> <t:errors/>
> Input Name: <t:textfield t:value="name" t:validate="required"/><br/>
> <t:submit t:mixins="DisableAfterSubmit"/>
> </t:form>
>
> And this is the page class:
> public class TestPage {
> @Property
> private String name;
> void onValidateFromForm() {
> System.out.println("ONVALIDATE TRIGGERED");
> try {
> Thread.sleep(2000);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
> }
> }
>
> When I use mixins, the client validation / popup is shown when I move away
> from textfield, but the popup doesn't show when I clicked submit button:
> <t:submit t:mixins="DisableAfterSubmit"/>
>
> When I remove the mixins, the client validation works when I clicked submit
> button.
> <t:submit />
>
> Thanks in advance..
>
> Best regards,
> Yohan Yudanara
>
> On Sat, Jan 28, 2012 at 3:25 AM, Lenny Primak <lprimak@(protected):
>
>> As I said before i never did extensive tests with client validation, but
>> it should work.
>> What exactly isn't working? Are the popups not showing up?
>> Is it working differently if the mixin isn't there?
>> Can you post your template / code? And if you really think this is a bug
>> feel free to open an issue against it as well.
>>
>>
>> On Jan 27, 2012, at 10:10 AM, Yohan Yudanara <yohan.yudanara@(protected)>
>> wrote:
>>
>>> I'm sorry to resurrect this thread :)
>>>
>>> I've tried DisableAfterSubmit with Tapestry 5.3.1, it works great.
>>> But the client side validation is not working. It seems client side
>>> validation is not triggered at all when I'm using DisableAfterSubmit
>> mixins.
>>> Did you also having the same experience ? or did the client validation
>>> supposed to work?
>>>
>>> Thanks in advance...
>>>
>>> On Tue, Nov 22, 2011 at 5:59 AM, Lenny Primak <lprimak@(protected)
>>> wrote:
>>>
>>>> I just did a quick test with form/zone/clientValidations and the mixin
>>>> works correctly.
>>>>
>>>> On Nov 21, 2011, at 5:45 PM, Lenny Primak wrote:
>>>>
>>>>> I see...
>>>>> I actually never tried forms with client-side validation with the
>> mixin.
>>>>> If it doesn't work, please feel free to submit an issue, even better a
>>>> patch with tests, if required.
>>>>>
>>>>>
>>>>> On Nov 21, 2011, at 5:15 PM, hongdengdao wrote:
>>>>>
>>>>>> sorry , still confused,  in your code , you bind click event , but
>>>> when it's a link submit , you click it , if has a client validation
>> error ,
>>>> it will still submit?
>>>>>>
>>>>>> thanks for you patient.
>>>>>>
>>>>>> On 2011年11月22日 06:02, Lenny Primak wrote:
>>>>>>> It's _after_ submit. It doesn't have to do anything with validation.
>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>>>> For additional commands, e-mail: users-help@(protected)
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.