|
From: Erwin V. <erw...@er...> - 2005-04-27 16:55:14
|
Another possibility is putting the Errors object in the FLOW scope (by default it is in REQUEST scope). That way it (and the binder with all its custom editors) will be available for the entire lifetime of the flow, so you only have to initialize it once (e.g. when the flow starts). Note that you can use FormAction.setupForm() to init the binder and put the Errors in the REQUEST or FLOW scope. Erwin Vervaet erw...@er... ----- Original Message ----- From: "Will Butler" <wil...@ra...> To: <spr...@li...> Sent: Wednesday, April 27, 2005 6:18 PM Subject: Re: [Springframework-developer] BindStatus.value > So, how can I handle this with web flow? For each "request" in which a > bind is not performed, it seems that I will have to add in a state that > creates a binder, registers my custom editors, and sticks the bind > exception model in my model. Have any other web flow users dealt with > this problem? > > Thanks, > > Will > > On Thu, 2005-04-14 at 17:23 +0200, Juergen Hoeller wrote: >> Well, the custom property editors are carried by the BindException's >> BeanWrapper instance. If there is no BindException in the model, we can >> only >> use a default BeanWrapper to obtain a property value, where there can't >> be >> any custom editors... >> >> So if you want custom property editors to apply, expose the binder's >> BindException through including errors.getModel() in your model. Even if >> there are no errors contained in it, this will expose all custom property >> editors that apply. >> >> Juergen >> >> >> -----Original Message----- >> From: spr...@li... >> [mailto:spr...@li...]On Behalf >> Of Will Butler >> Sent: Thursday, April 14, 2005 8:50 AM >> To: spr...@li... >> Subject: [Springframework-developer] BindStatus.value >> >> >> All, >> >> When there are errors in the model, status.value is obtained from >> errors.getFieldValue(expression), which executes a custom property >> editor for the field if one exists. >> >> When there aren't errors in the model, status.value is obtained from the >> bean wrapper, and custom property editors are not invoked. Why not? >> >> Thanks, >> >> Will >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |