PerShing2014 / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

worksheet problem #288

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi jeff. I need your help.

I´m doing validation on my worksheet, i have a column called value that is 
editable and the rest of the columns in the table aren´t. But i need to 
compare this worksheet property with two of the columns wich are not part of 
the worksheet. How can i get the values of these two columns¿? i´ve seen the 
getItems methods of the TableModelUtils class but i´m workig on the the 
woorksheetsaverImpl and i don´t know how i can get the request and i don´t 
know what it is the PageItem argument.

Thanks jeff!

Original issue reported on code.google.com by VictorRo...@gmail.com on 4 Oct 2010 at 11:48

GoogleCodeExporter commented 8 years ago
There are two parts to the worksheet validation. You can do it on the client, 
or do it on the server (or both). 

If you do it on the client then you would have to write some sort of custom 
JavaScript that would look in the other row columns for the values. You 
probably saw that the client side validation use the bassistance plugin? You 
would have to write a custom plugin for this, and/or hook into JMesa's 
JavaScript API. You would be trending new water as I have not done this.

http://code.google.com/p/jmesa/wiki/WorksheetAddRemoveRowsV3

To do sever side validation you would need to flag the column with an error. 
Take a look at this example that shows you how in the  validateColumn() method. 
To get the other column values you would have to get those from your database. 
The reason is the worksheet only keeps the columns that changed, not the whole 
row.

http://code.google.com/p/jmesa/source/browse/trunk/jmesaWeb/src/org/jmesaweb/con
troller/WorksheetPresidentController.java

I think that you will find the server side validation easier, unless you are 
really comfortable with jQuery.

Original comment by jeff.johnston.mn@gmail.com on 5 Oct 2010 at 5:06

GoogleCodeExporter commented 8 years ago

Original comment by jeff.johnston.mn@gmail.com on 9 Mar 2011 at 8:44