Aw: Re: Purpose of JSR-BeanValidation in RequestFactory
On server side you can use a custom ServiceLayerDecorator and implement the validate method to customize the validation process (ReflectiveServiceLayer contains the default way of validaton). In your bean you could use validation groups: the default one that is used by the client side code and an additional server validation group. In your ServiceLayerDecorator you would then validate against the server validation group. I think that way you should be able to allow null fields on client side but disallow them on server side. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/L7ETpIDfBJYJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Purpose of JSR-BeanValidation in RequestFactory
I am having the same issue. I need to do some pre-processing of my beans on the server before I fire validation, but the framework doesn't allow that. It only fires validation on the beans as soon as they are decoded off the wire. As far as I can tell, the RequestFactory also doesn't give you hooks to fire your own validation later or to feed your own validation errors back into the onViolation callback. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/ru5eIviFkA8J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Purpose of JSR-BeanValidation in RequestFactory
I wonder if the JSR 303 bean validation at the client-server-interface is really helpful. I stumbled upon two restrictions why I decided to deactivate the validation: - Beans created within the client might be populated in the back-end. For instance, I have a @NotNull column which contains the creationDate of an entity. It doesn't make sense to let clients set this value, instead it is set just before persisting the first time. - Beans object graph needs to be complete for relations with cardinality 1 or 1..n. Again a @NotNull association prevents partially filled beans to be send back to the server. Opinions? Regards, Stefan. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Bt_UircGSkIJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.