My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 292: Validation Help
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Mar 2011


 
Reported by VictorRo...@gmail.com, Oct 14, 2010
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
No, that would not be possible. The JavaScript is made up for the column just once. The validation framework that JMesa uses supports it (with a callback) but that functionality is not exposed. I am not sure it would work (on a table) even if we somehow could expose it.
Oct 18, 2010
Project Member #2 jeff.johnston.mn@gmail.com
You could do the validation on the server side...
Oct 18, 2010
#3 VictorRo...@gmail.com
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
Project Member #4 jeff.johnston.mn@gmail.com
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
Project Member #5 jeff.johnston.mn@gmail.com
Not sure if we still have an issue...will close for now.
Mar 9, 2011
Project Member #6 jeff.johnston.mn@gmail.com
(No comment was entered for this change.)
Status: Invalid

Powered by Google Project Hosting