hand79 / Hadoop

Hadoop 開發實作&筆記
0 stars 0 forks source link

If you have problems with DroplistWorksheetEditor, maybe you can try this #282

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Things have changed so much that this is not relevant anymore.

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