You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Joost Schouten (ml)" <jo...@jsportal.com> on 2011/05/31 15:42:15 UTC

Importing multiple stacks in a formelement extending AbstractField causes a ghost processSubmission

  Hi,

I took the tapx datefield component as a base and altered it somewhat to 
my own needs. One of those was to add two javascript stacks I use 
@Import(stack = {CommonBaseStack.STACK_NAME, DateFieldStackV2.STACK_NAME})

It has taken me most of the day to figure out that this was the cause of 
the validation being called twice on formsubmit. Once with the correct 
input id, and one with a non existing input id. So if you set the 
validation to required validation will always fail as the nonexisting 
field obviously will always be null.

It seems like adding multiple stacks will for some reason add two 
processSubmission actions to the form. My understanding of the form 
handling at this level is not deep enough, but this smells like a bug. 
Can anyone shed their light on this issue?

Adding one of the stacks to the other and just importing one into my 
component fixes the problem. But shouldn't be importing multiple stacks 
be possible?

Cheers,
Joost

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


Re: Importing multiple stacks in a formelement extending AbstractField causes a ghost processSubmission

Posted by "Joost Schouten (ml)" <jo...@jsportal.com>.
  On 31/05/11 7:08 PM, Josh Canfield wrote:
> If you create a stack with a noop script in it, do you get the same behavior?
I need to have another go at this to understand it better. It also only 
seemed to occur when in a zone after zone update. I'll get back to this 
once my missed deadline due to this problem has been met ;-)

Cheers,
Joost
> On Tue, May 31, 2011 at 6:42 AM, Joost Schouten (ml)
> <jo...@jsportal.com>  wrote:
>>   Hi,
>>
>> I took the tapx datefield component as a base and altered it somewhat to my
>> own needs. One of those was to add two javascript stacks I use @Import(stack
>> = {CommonBaseStack.STACK_NAME, DateFieldStackV2.STACK_NAME})
>>
>> It has taken me most of the day to figure out that this was the cause of the
>> validation being called twice on formsubmit. Once with the correct input id,
>> and one with a non existing input id. So if you set the validation to
>> required validation will always fail as the nonexisting field obviously will
>> always be null.
>>
>> It seems like adding multiple stacks will for some reason add two
>> processSubmission actions to the form. My understanding of the form handling
>> at this level is not deep enough, but this smells like a bug. Can anyone
>> shed their light on this issue?
>>
>> Adding one of the stacks to the other and just importing one into my
>> component fixes the problem. But shouldn't be importing multiple stacks be
>> possible?
>>
>> Cheers,
>> Joost
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


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


Re: Importing multiple stacks in a formelement extending AbstractField causes a ghost processSubmission

Posted by Josh Canfield <jo...@gmail.com>.
If you create a stack with a noop script in it, do you get the same behavior?

On Tue, May 31, 2011 at 6:42 AM, Joost Schouten (ml)
<jo...@jsportal.com> wrote:
>  Hi,
>
> I took the tapx datefield component as a base and altered it somewhat to my
> own needs. One of those was to add two javascript stacks I use @Import(stack
> = {CommonBaseStack.STACK_NAME, DateFieldStackV2.STACK_NAME})
>
> It has taken me most of the day to figure out that this was the cause of the
> validation being called twice on formsubmit. Once with the correct input id,
> and one with a non existing input id. So if you set the validation to
> required validation will always fail as the nonexisting field obviously will
> always be null.
>
> It seems like adding multiple stacks will for some reason add two
> processSubmission actions to the form. My understanding of the form handling
> at this level is not deep enough, but this smells like a bug. Can anyone
> shed their light on this issue?
>
> Adding one of the stacks to the other and just importing one into my
> component fixes the problem. But shouldn't be importing multiple stacks be
> possible?
>
> Cheers,
> Joost
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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