I'm assuming Abort can ignore what you've typed into the form, in which case the more common technique is to use a link component instead of a submit. That way you bypass the validators. You can style a link to look like the submit button easily enough if that's what you'd like, eg.

        <input type="submit" value="Save"/>
<a t:type="pagelink" t:page="thePreviousPage" style="text-decoration: none">
                <input type="button" value="Abort"/>
        </a>

Or use t5components/Submit from http://87.193.218.134:8080/t5c-demo/buttonpage .

By the way, onSuccess() is a dangerous place to put validation. See https://issues.apache.org/jira/browse/TAPESTRY-1972 .

Cheers,
Geoff

On 04/07/2008, at 8:40 PM, Udo Abel wrote:

Hi,

I think the order of events during form submission should be described in a state diagram or so, otherwise you cannot know when to do what.

I found out that the onValidate event is fired before any button select event. That means, in onValidateForm you don't know whether the user pressed "save" or "abort" - which should be known for validation. That's probably the reason why I found so many people using onSuccess for validation, what I find not very beautiful.

Since form submission is very essential, I think the system (and the documentation) should be very clear at that point, which is not yet the case.

Regards,
Udo.
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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


Reply via email to