In 4.0 Submit, LinkSubmit, and ImageSubmit all have a "listener"
parameter for a listener that is notified immediately and an "action"
parameter for a listener that gets notified after all components have
updated their properties. This seems to have disappeared from the
LinkSubmit docs but I'm pretty sure it's still valid as of the latest
beta.

Ben

-----Original Message-----
From: Patrick Casey [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 05, 2005 8:12 PM
To: 'Tapestry users'
Subject: RE: Discovering which submit button was pressed, on page load


        Not unless your button listeners rewind before your widgets,
nope.
In 3.0.3 the rewind process was basically top to bottom so putting your
button on top of the form did the trick. I seem to recall though that
Howard
changed it for 4.0 so that button listeners now run after widget rewind,
but
there might be a flag to specify the old behavior. Somebody more
familiar
with 4.0 could answer that for you though.

        --- Pat

> -----Original Message-----
> From: i n [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 05, 2005 5:47 PM
> To: Tapestry users
> Subject: Re: Discovering which submit button was pressed, on page load
> 
> Many thanks for everyone's answers.
> 
>         The quick answer is: short of doing some client side
javascript,
> you
> > can't tell.
> >
> >         You could try using button listeners,
> 
> 
> 
> The problem is that this would bypass the form validation.  Is there
any
> way
> I can *force* validation within the button listener, after I've done
the
> necessary processing?
> 
> My entire problem boils down to - I need to perform some actions on
the
> data
> source, depending on the button pressed, before validation of the data
> source occurs.
> 
> or the selected and tag
> > attributes of the submit button to differentiate button pushes.
These
> > though
> > are set during the rewind cycle so you won't be able to intuit this
> > information.
> >
> >         One approach you could do would be to interrogate the
servlet
> > request manually and try to figure out which button was pushed that
way,
> > but
> > I hesitate to suggest it because it basically involves an aggressive
> > end-run
> > around Tapestry.
> >
> >         --- Pat
> > > -----Original Message-----
> > > From: i n [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, December 05, 2005 5:06 PM
> > > To: [email protected]
> > > Subject: Discovering which submit button was pressed, on page load
> > >
> > > Hi,
> > >
> > > I have a form with multiple submit buttons.  When the form is
> submitted
> > > (and
> > > before validation occurs, and before the button listeners get
called),
> I
> > > want to find out some information about how the request was
submitted.
> > >
> > > * How I can determine the submitting button?  I have tried
> implementing
> > > PageValidateListener, and looking at the PageEvent, but can't seem
to
> > find
> > > the button's name.
> > > * Assume the button is inside a @For component, and the button's
> > listener
> > > is
> > > parameterized with the row number (e.g., doSubmit(Integer index)).
> How
> > > can
> > > I determine this number upon page load?
> > >
> > > Any help is appreciated.
> > > Thanks
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to