RE: Mutliform validation using a DynaValidatorForm

2003-02-19 Thread Andy

DynaValidatorActionForm and DynaValidatorForm don't work for multipage
forms.  The page attr is not being set for dynamic forms.  

http://issues.apache.org/bugzilla/show_bug.cgi?id=16337

The patch is pretty easy, but this got marked for 1.2.  The patch I use
locally 
is:

public class MyForm extends DynaValidatorForm {
public void set(String s, Object o) {
if ( s.equals(page) ){
if ( o != null ){
String val = o.toString();
if ( val != null  ( val.length()  0 )) {
try {
super.setPage( Integer.parseInt(val) );
} catch (NumberFormatException e) {
// Oh well.
super.setPage(0);
}
} else {
super.setPage(0);
}
}

}
super.set(s, o);
}
public void setPage(int i) {
set(page, +i);
}
}

-Original Message-
From: Brian Blignaut [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 3:57 AM
To: [EMAIL PROTECTED]
Subject: Mutliform validation using a DynaValidatorForm


Hi,

Has anyone attempted to use the 'page' property of a field, with a 
DynaValidatorForm? It seems to me that there is a bug around doing this?

Thanks
Brian


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



Re: Mutliform validation using a DynaValidatorForm

2003-02-19 Thread Steve Stair
There is indeed a bug in multipage DynaValidatorForm usage

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg55576.html



--
Steve Stair
[EMAIL PROTECTED]
(512) 463-7991

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




Re: Mutliform validation using a DynaValidatorForm

2003-02-19 Thread Dennis Muhlestein
There is a bug.  page property on DynaValidatorForm (Or DynaActionForm
for all I know) isn't set when then form is submitted.  Don't know if
this is a filed issue.. haven't checked.  I had to make my own formbean
to have a multi page form.

Another issue you need to be aware of:
If you have checkboxes, your reset method needs to be aware of what page
is being submitted and only reset the checkboxes for the page you are
submitting.  Otherwise, you might check a box on page 1, only to have it
be unchecked when you submit page 2.

-Dennis

On Wed, 2003-02-19 at 02:57, Brian Blignaut wrote:
 Hi,
 
 Has anyone attempted to use the 'page' property of a field, with a 
 DynaValidatorForm? It seems to me that there is a bug around doing this?
 
 Thanks
 Brian
 
 
 -
 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]