http://code.google.com/p/jmesa/wiki/DroplistWorksheetEditor
Above page contains source code of DroplistWorksheetEditor, java class
code and javascript code.
First, in java class code, change
html.onchange(getUniquePropertyJavaScript(item) +
"submitWsDroplistColumn(this, '" + limit.getId() + "'," +
UNIQUE_PROPERTY + ",'" + getColumn().getProperty() + "', '" + value +
"')");
to
html.onchange(getUniquePropertyJavaScript(item)
+"jQuery.jmesa.submitWsDroplistColumn(this, '"+ limit.getId() +"',"+
UNIQUE_PROPERTY +",'"+ getColumn().getProperty() +"', '"+ value
+"')");
We don't need to put javascript code in jsp page anymore,
instead, we modify javascript code and write it into jquery.jmesa.js.
Now, open jquery.jmesa.js, find "var worksheetapi = {" (line 576
maybe),
and write javascript code into var worksheetapi = {};
like this:
var worksheetapi = { // line 576
submitWsDroplistColumn : function(column, id,
uniqueProperties, property, originalValue) {
wsColumn = new classes.WsColumn(column, id,
uniqueProperties, property);
var changedValue =
column.options[column.selectedIndex].value;
$.jmesa.submitWsColumn(originalValue, changedValue);
wsColumn = null;
},
createWsColumn : function(column, id, uniqueProperties,
property) { // original line 577
Original issue reported on code.google.com by jeff.johnston.mn@gmail.com on 13 Sep 2010 at 3:05
Original issue reported on code.google.com by
jeff.johnston.mn@gmail.com
on 13 Sep 2010 at 3:05