Re: struts validator

"Michael Nash JGlobal.com" <[email protected]> Mon, 7 Jun 2004 16:37:24 -0400
Newsgroups gmane.comp.java.keel.user
Organization JGlobal
Message-ID <20040607163724.23f8537f@jglobal>
Lou:

Ah, sounds like you found a couple of interesting bugs there - can you see if the XML being generated from the xdoclet below looks right? I think I've found the problem where the errors we'ren't being displayed, I'll be checking in a patch momentarily.

And yes, a patch on the bugs below would definitely be appreciated! 

Thanks!

Mike

On Mon, 7 Jun 2004 12:45:03 -0700
"Louis Moore" <[email protected]> wrote:

> Thanks -- so I got started working with the DefaultModelValidator,
> here's the metadata for a model I have using it:
> 
> @model.model
>   name="testeng.getcase"
>   id="testeng.getcase"
>   logger="testeng"
> @model.parameter
>   name="caseid"
>   required="true"
>   type="java.lang.String"
>   pattern="CASE[0-9]{8}"
> @model.validation-error
>   model="testeng.prompt-getcase"
>   params="true"
> 
> And I got it to work but I found a couple of bugs along the way. (These
> are in both 2.1-dev and CVS HEAD):
> 
> 1) The redirect to the validation-error model code is always executed.
> (meaning even if your input is valid you get redirected) 
> 2) But if validation-error params=false, the redirect command is not
> returned. (meaning if you have params=false the redirect never happens
> at all)
> 
> I was able to fix both of these in my code and it's working fine. I'd be
> happy to submit a patch if you want. The only problem I'm still having
> is the errors aren't being displayed after redirect when the pattern
> wasn't matched (using the keel:errors tag). I'd appreciate any ideas on
> that.
> 
> Regards,
> Lou
>  
> 
> -----Original Message-----
> From: Michael Nash JGlobal.com [mailto:[email protected]] 
> Sent: Saturday, June 05, 2004 11:05 AM
> To: user-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]
> Cc: Louis Moore
> Subject: Re: [Keel User] struts validator
> 
> Lou:
> 
> Just wanted to let you know there's now a start on documentation for the
> Validation service. Have a look at the Keel manual (HEAD version), in
> the "Default Model Service" chapter. It needs more, but I think there's
> enough to get the general idea!
> 
> Mike
> 
> On Thu, 3 Jun 2004 10:51:44 -0700
> "Louis Moore" <[email protected]> wrote:
> 
> > Hi,
> > 
> > Is there any documentation or examples of how to use the struts
> > validator framework within keel? Since Keel has only one action
> mapping
> > and form-bean for the model action it seems like maybe the validator
> > framework isn't a viable option unless I abandon the use of models and
> > write my own struts actions. Is this the case or is there a way to
> > configure the validator to work with keel models?
> > 
> > If the struts validator plug-in isn't supported well within keel I'm
> > considering creating a keel validation service with the
> turbine-fulcrum
> > project's intake service. 
> > 
> > Thanks,
> > Lou
> > _______________________________________________
> > User mailing list
> > [email protected]
> > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
> 
> 
> -- 
> Michael Nash
> 
> JGlobal Ltd 
> Next-Generation Web Application Development and Open Source Support
> http://www.jglobal.com
> 
> Bahamas Commerce and Trade
> Offshore eCommerce Hosting and Business Services
> http://www.bahamascommerce.com
> 
> 
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org


-- 
Michael Nash

JGlobal Ltd 
Next-Generation Web Application Development and Open Source Support
http://www.jglobal.com

Bahamas Commerce and Trade
Offshore eCommerce Hosting and Business Services
http://www.bahamascommerce.com