yes it is possible to solve this in a number of ways. I just wanted to know if the is an easy way of doing it. I've looked at the struts/validatior implemtentation, it would only mean changing one line of code ( a <= to a = ) to have my desired behaviour. It would not be hard to make this an attribute of the ValidatiorForm. I mean making the assumption that the pages always are ordered is not the most generic approach ;)
Thanks anyway!
Hookom, Jacob wrote:
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]
-- +---------------------------------------------------------------------+ Mikael Wikblom mailto:[EMAIL PROTECTED] Senior Software Engineer MoS in Computer Sci. and Eng., LiTH
AdNovum Informatik AG http://www.adnovum.ch phone: +41 (0)1 272 6111 Roentgenstrasse 22, CH-8005 Zuerich fax: +41 (0)1 272 6312 +---------------------------------------------------------------------+ AdNovum Software Inc. San Mateo, CA 94404 phone: +1 (650) 525 9322 1400 Fashion Island Boulevard, Suite 309 fax: +1 (650) 525 9324 +---------------------------------------------------------------------+
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]