On 30/04/2010, at 4:29 PM, Bob Morley wrote:

> 
> 
> Scott Gray-2 wrote:
>> 
>> I need to do some custom survey response validation that happens in
>> addition to the OOTB answer validation.  I was hoping to be able to use
>> Survey.responseService but this is run asynchronously and looks to be more
>> of a post processor.
>> 
>> Any thoughts about about adding a validationService field to the Survey
>> entity?  The service would run before the SurveyResponse is committed but
>> after the OOTB answer validation.
>> 
> 
> We would make use of such a feature.

Glad to hear it, thanks.

> Is there an opportunity to plug-in a server-side validation service on any
> ModalForm?  Has this been discussed before from you knowledge (excuse my
> lack of search).  The theory would be that your dynamically generated
> ModelForm instance could apply this validation service to the model.  The
> RequestHandler on post-back could determine the ModelForm and execute any
> defined validation service (if technically feasible).

What you could perhaps do is make sure you use services as your request map 
events and then create a special request/event that you can call via ajax that 
will valid the parameters against the service definition by serializing the 
form and telling it what your target request is.  There is a seldom used child 
element to service -> attribute called type-validate which can allow you to do 
custom field level validation on incoming parameters.
You just need to call modelService.validate(parameters, "IN", locale) in your 
special validation request/event and you're done.

Regards
Scott

> This would allow programmatic ModelForms an entry point for server-side
> validation as well as system-wide server-side validation via model
> transformation.  It could also be used to separate/share validation from
> execution in our standard xml representation of the ModelForm.
> -- 
> View this message in context: 
> http://ofbiz.135035.n4.nabble.com/Survey-Response-Validation-tp2075211p2076492.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to