| Issue 292: | Validation Help | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hello Jeff. I wanna do some min, max validation on my jmesa table. I do the next thing.
worksheetValidation="required:true;min:${bean.minValue };max:${bean.maxValue }"
I wanna do min-max validation based coming from the bean on the collection. The problem is that the values are always the same (the values of the first bean of the collection) . Is there something i can do¿?
Thanks!
Oct 18, 2010
Project Member
#1
jeff.johnston.mn@gmail.com
Oct 18, 2010
You could do the validation on the server side...
Oct 18, 2010
Hi jeff. Yes, thats what i thoug, to do the validation on the server side, but how can i get the min and max value of the columns of the server side if they are not part of the worksheet?
Oct 19, 2010
You would have to use the WorksheetRow uniqueProperty value and go query a service in your code to find the bean (item). The worksheet only holds the changes made and gives you a way to associate the row back to the original object via the uniqueProperty value. As we have worked with the worksheet more at my company we have found cases that we wished we had more information about the row. But it is a balance between having too much information in session and not enough. Did you see how you can set errors back on the worksheet column? Overall I am always looking for input about the worksheet. Compared to the other features in JMesa the worksheet is relatively new. If you think of ways that it could be better and are willing to experiment with the code we could talk about what it would mean to do something else, or at least make some features more plugable. One thing I am on the fence about is the client side validation. On one hand I like the way it is implemented, but on the other it might just be easier to work with on the server. But I figure we can try it out for awhile and if need be we could keep the method calls the same but flip a flag to say do this on the server. That way people can use client or server side validation with the same syntax.
Mar 9, 2011
Not sure if we still have an issue...will close for now.
Mar 9, 2011
(No comment was entered for this change.)
Status:
Invalid
|