How about having a separate ValidationDelegate for each form button? You could have a "creditDelegate" and a "promotionDelegate". I'm assuming that when the user clicks "enter another" you just refresh the page and display the value they entered along with a text field for the new value. In this case, you would check your promotion delegate for errors in the enterAnother listener. You would also most likely have to clear the errors from the creditDelegate in this listener since the user hasn't necessarily entered that information. I'm not sure if you are asking how to do multiple submit buttons per form, but here's a quick writeup on it if you're interested:
http://jroller.com/page/mdillon101/20050210#multiple_listeners_for_a_single Hope this helps. I'd be interested to hear more about your product if you want to e-mail me directly. Cheers, Mark On 6/5/05, phillip rhodes <[EMAIL PROTECTED]> wrote: > > I am finding that the UI design for a particular page > that the client is requiring is causing me to have a > headache in regard to tapestry validation. It would > not be a problem if I could just separate the > functionality into 2 different forms.... > > I have a checkout page that has a required validator > working for credit card information (credit card > number, bill address, date, etc). In the same form, > there is a field for customers to input gift > certificates, promotion codes, etc.. as payments. > There is "Enter Another" submit button along with this > field that invokes a "enterAnother" listener. This > listener will read the field and enter that as a > payment for their order. Customer have the ability to > just enter the one promotion code they have into the > form and proceed in the checkout. > > The problem occurs when one submits a enterAnother > listener, the validation for the entire form is > triggered. While I understand that I could disable > this validation by binding the required flag to a page > property, I can simultaneously bind one submit button > to both a listener and a page property. > > Anybody have any ideas how I can solve this problem? > Thanks. > > BTW, This cart I am working on is soon to be released > with an apache open-source license. It has 120 db > tables (already) and over 1meg of compile binary code. > While code/table numbers do not measure quality, they > do measure my effort. Features include portal/cms/sso > . Tools are tapestry/lucene/hibenate. Seeking help! > Send an email.... I also need a cool name for it;) > It will be professional-grade. > > > > > > > > --------------------------------------------------------------------- > 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]
