Re: Just one question. Does page works with DynaValidatorForm?

2002-09-10 Thread JuanPedro . DeAndres

I've done this and know it works with DynaValidatorForm, just taking the page value
from the DynaForm and Setting it.

This is the only solution I have found.


public class MiDynaValidatorForm extends DynaValidatorForm {

private static Log milog = LogFactory.getLog(MiDynaValidatorForm.class);

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

ServletContext application = getServlet().getServletContext();
ActionErrors errors = new ActionErrors();


try{
  Integer dinaPage =(Integer)PropertyUtils.getSimpleProperty( this,"page");
  if(dinaPage!=null) setPage(dinaPage.intValue()); 
<---setPage
}catch(Exception e){
  if(!(e instanceof java.lang.NoSuchMethodException))
milog.error(e.getMessage(),e);
}


Validator validator = StrutsValidatorUtil.initValidator(mapping.getAttribute(),
this,
application, request,
errors, page);

try {
   validatorResults = validator.validate();
} catch (ValidatorException e) {
   milog.error(e.getMessage(), e);
}

return errors;
}

}



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Just one question. Does page works with DynaValidatorForm?

2002-09-10 Thread Eddie Bush

Have you:

* Looked at the struts-validator.war application?
* Read Chuck's book (he's got a whole chapter on the validator!) on 
theserverside.com?  (search for struts book review)

Those are the first two places I would hit.

Regards,

Eddie

[EMAIL PROTECTED] wrote:

>If anyone have an example, that should make me happy .
>
>Thanks.
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Just one question. Does page works with DynaValidatorForm?

2002-09-10 Thread JuanPedro . DeAndres

If anyone have an example, that should make me happy .

Thanks.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: