Closed GoogleCodeExporter closed 9 years ago
I have not created 2 worksheets on the same page before...it should work
though. I am talking to Siddhant to see if there are any problems with the
validation.
For sure you can define a save button outside the table. If you do a view
source on the save button (on toolbar) you can see the JavaScript that it
calls. You basically just need to do the same thing.
To submit two tables you need to make sure that you set the table state for
each to say that the table is being saved and then generate the hidden fields.
setSaveToWorksheet('table1');
setSaveToWorksheet('table2');
createHiddenInputFieldsForLimit('table1')
createHiddenInputFieldsForLimitAndSubmit('table2');
If you have problems I will try to help but you might need to step through the
code if you have issues. Technically it should work but I have not done it yet.
I have worked with multiple tables on one page though...just not multiple
worksheets.
Original comment by jeff.johnston.mn@gmail.com
on 18 Oct 2010 at 9:51
Hi jeff. Thanks for your response. I think i didn´t explain well my issue,
cause of course, i maybe can work with two tables and only one worksheet and
then on the save action look for each column of the different tables on the
same worksheet, is this possible¿?
Thanks again for your help!
Original comment by VictorRo...@gmail.com
on 19 Oct 2010 at 6:51
For sure you would have to work with two worksheets. Even if the worksheet
strategy was plugable I am not sure it would be very useful. You would really
need to know which table each row is referencing, and it does not know that.
You can easily get at both worksheets as long as you use the
TableModelUtils.saveWorksheet(). You could not work with the concrete
TableModel class for saving the worksheet as it only accepts one
WorksheetSaver. That might be worth enhancing though...
Does that make sense?
Original comment by jeff.johnston.mn@gmail.com
on 19 Oct 2010 at 3:37
Siddhant got back to me and reminded me that right now we cannot have two
worksheets on the same page. The reason is we have a "feature" that the
worksheet will be cleared if you leave the page you are on and come back.
Sorry...right now two worksheets on one page is not possible.
However, we are talking about removing this feature. The reason we would do it
is because we now have a button to clear worksheet changes, and a toolbar
widget that tells the user there are changes in the worksheet. I remember now
that the reason we did not do that for 3.0 is because there was not enough time
to do that and test.
Original comment by jeff.johnston.mn@gmail.com
on 19 Oct 2010 at 4:22
Hi jeff. Ok i can´t work with two worksheet, but i can work with one
worksheet, can´t i¿? on the saveworksheet i can implement a worksheetimpl in
which i can diferrenciate beetwen the rows, for example one table has a column
of checkbox with id checkbox_c and the other with id checkbox_f. while i go
through the saved rows on the worksheet i can ask if the property name is one
or another and do one thing or the other. Is this right¿?
Original comment by VictorRo...@gmail.com
on 19 Oct 2010 at 6:32
What you are talking about is how you normally would use the Worksheet. You
would not have to specify your own worksheetimpl either, but just use the one
passed to you when saving.
Original comment by jeff.johnston.mn@gmail.com
on 19 Oct 2010 at 7:35
How to Create our own button in jmesa table....
Original comment by anandbab...@gmail.com
on 10 Dec 2010 at 9:56
It is possible to have two worksheets on the same page now.
Original comment by jeff.johnston.mn@gmail.com
on 10 Mar 2011 at 8:12
Are there any examples of using two editable worksheets on a single JSP? I've
been searching but I haven't been able to locate. Please advise. Best, Sam
Original comment by samuel.r...@gmail.com
on 6 Jan 2012 at 9:41
I think this might work now...still have not tried it.
setSaveToWorksheet('table1');
setSaveToWorksheet('table2');
createHiddenInputFieldsForLimit('table1')
createHiddenInputFieldsForLimitAndSubmit('table2');
Technically, if you submit a form what you are trying to do is capture all the
table attributes as hidden form fields so that the state is preserved. If you
use ajax then it is not an issue as you only submit one table at a time anyway.
For sure get one worksheet working and then I can work with you to see if we
can get two working.
Original comment by jeff.johnston.mn@gmail.com
on 7 Jan 2012 at 9:21
Original issue reported on code.google.com by
VictorRo...@gmail.com
on 18 Oct 2010 at 7:07