Re: Bean Validation: Client vs Server
Yeah, String.matches only matches the entire input. I need to see if the string contains a regular expression, as in pattern.matcher(string).find(). Also, String.matches compiles the expression every time. -- 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/-/LIxr69EzgHYJ. 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: Bean Validation: Client vs Server
I thought about just using RegExp on the sever, but it just seemed wrong to rely on that on the sever. Not sure why, since I'm pretty coupled to GWT in any case. :) The super-source idea is interesting. I didn't know about that feature before. Googling it, it seems pretty interesting. Thanks for the recommendations! I think I'll try out the super-source idea and then fallback to using RegExp. -- 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/-/Cx4IsOkEJI8J. 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: Bean Validation: Client vs Server
Why don't you use the com.google.gwt.regexp.shared.RegExp on the server too? Otherwise, I believe using super-source you could provide a client-side-only implementation. -- 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/-/ycVR8IDUL6wJ. 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: Bean Validation: Client vs Server
What methods are you using with Pattern/RegExp. String.matches isn't enough? On 3. Okt, 00:53 h., objectuser wrote: > I'm differentiating validations to be run on the client vs. the server using > validation groups. > > However, I have one validation for which I'd like a different implementation > the client, due to the unavailability of the Pattern class there. So on the > client, I'd like to use the GWT RegExp class, while on the server, I'd like > to use the JDK Pattern class. > > So far, I've not figured out a way to do this. It seems like the only place > to specify the validator class is in the validatedBy property of the > @Constraint annotation. > > I even tried creating two different custom validation annotations, but the > validation framework still seems to load the server version, and I get a > runtime error due to the unavailability of the Pattern class. > > Thanks for any advice. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. 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.
Bean Validation: Client vs Server
I'm differentiating validations to be run on the client vs. the server using validation groups. However, I have one validation for which I'd like a different implementation the client, due to the unavailability of the Pattern class there. So on the client, I'd like to use the GWT RegExp class, while on the server, I'd like to use the JDK Pattern class. So far, I've not figured out a way to do this. It seems like the only place to specify the validator class is in the validatedBy property of the @Constraint annotation. I even tried creating two different custom validation annotations, but the validation framework still seems to load the server version, and I get a runtime error due to the unavailability of the Pattern class. Thanks for any advice. -- 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/-/jvwBMVoAzSUJ. 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.