The Callback function that is called. Set with the constructor typically but it's here so you can override.

The callback function receives two parameters:

When the callback handler is called the text entry control is still active and has not been relieved. The return value from the callback determines the action that is taken for setting the text of the edited element:

An example of a callback function that delays updating until an AJAX callback returns, looks like this:

function ShowUpdateColumn(value, editable) { if (editable.origText == editable.enteredText) { showMessage(column + " not updated. Same value."); return false; // leave original } showMessage("updating on server..."); // *** Figure out the column name by 'convention' of classname for element var column = editable.jcol.attr("class"); // *** Get the Row Pk from Row's ID: gridname_Pk var pk = editable.jcol[0].parentNode.id.split("_")[1]; // *** Make AJAX call to server method with wwWebCallbackMethod // *** Proxy is the static var based on the control's ID. Proxy.callMethod("UpdateField",[value,column,pk],updateField_Callback); // *** Create expando property with the editable class so we can // *** pick it up in the callback and complete the edit/abort cycle Proxy.lastEditable = editable; // *** Return null to keep from updating field // *** We'll update - or abort - in the callback return null; } function updateField_Callback(result, proxy) { var editable = proxy.lastEditable; if (!result) { editable.abort(); showMessage("Request aborted on the server."); return; } showMessage("Server Update: " + result); // *** Manually update the control editable.update(); editable.nextColumn(); }


See also:

Class wwEditable

  Last Updated: 1/27/2008 | © West Wind Technologies, 2008