We had to do this for our last project; I had an ActionForm for each page
with validator bindings to validate input on each page.  In the Actions, I
used the page's form to update a "transaction" bean in the session which I
in turn called a "commit" method on it to execute business logic (validate
product inventory/medical information/etc). The commit method then could
throw business exceptions which I bound to exception handlers.

I referred to it as "conflict-resolution" where your goal is a successful
"commit" of the transaction, but for any conflict, you resolve with a UI
page and separate action form to validate user's data.  Any input validation
would be taken care of by each page's ActionForm.


ActionForward execute(......) throws Exception
{
TransactionSession tx = getTransaction(httpSession);
tx.setQuantity(new Integer(form.getQuantity()));
tx.commit()
return mapping.findForward(SUCCESS);
}

-Jacob

-----Original Message-----
From: Mikael Wikblom [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 8:22 AM
To: [EMAIL PROTECTED]
Subject: Manipulate page validation for ValidatorForm

Hi,

I have the following problem; the page validation of the ValidatiorForm 
requires that the pages are ordered (e.g. a wizard-initalization) and 
performs validation for all pages <= current page. If a page is 
undefined or 0, validation for all pages is performed.

In my application I have an intialization that requires this 
functionality, but the pages I have are not ordered, making the 
validation of current page and all pages before invalid. What I do need 
is validation for page = current page and not the ones before.

Is this somehow possible without loosing the normal (validation.xml 
entries) validation? I'm using struts version 1.1.

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]

Reply via email to