Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call GWT'-CellTable-CustomEditTextCells api like Commit() & Cancel() from javascript/jquery?

I am using GWT2.3 celltable

How to call GWT'-CellTable-CustomEditTextCells api like Commit() & Cancel() froml using javascript/jquery?

Following is cancel() of EdittextCell-GWT

Any alternative to do this in javascript ?

    /**
   * Commit the current value.
   * 
   * @param context the context of the cell
   * @param parent the parent Element
   * @param viewData the {@link ViewData} object
   * @param valueUpdater the {@link ValueUpdater}
   */
  private void commit(Context context, Element parent, ViewData viewData,
      ValueUpdater<String> valueUpdater) {
    String value = updateViewData(parent, viewData, false);
    clearInput(getInputElement(parent));
    setValue(context, parent, viewData.getOriginal());  
    if (valueUpdater != null) {
      valueUpdater.update(value);
    }
  }

Following is cancel() of EdittextCell-GWT

Any alternative to do this in javascript

/**
   * Convert the cell to non-edit mode.
   * 
   * @param context the context of the cell
   * @param parent the parent Element
   * @param value the value associated with the cell
   */
  private void cancel(Context context, Element parent, String value) {
    clearInput(getInputElement(parent));
    setValue(context, parent, value);
  }

Using javascript I want to update new value to selected cell & covert it to non-edit mode How to this using javascript/jquery?

Extra Info:

When EditTextCell in non-edit mode that time it's internal html code is after click on editTextCell, cell is coverted from non-edit mode to edit mode. I created Input element + Img in that cell.

On click of Image I opened jquerys datepicker.

On click of "Done" button present on jquery datepicker I need to convert that cell to non-edt mode as well as update new value to valueUpdater provide by GWT celltable. valueUpdater update new value to celltable.

Please provide me solution or any pointer to solve this issue.

Thanks in advance.

like image 574
StackOverFlow Avatar asked Oct 21 '22 18:10

StackOverFlow


1 Answers

Did you try $('#renderedId').val("updatedValue").blur(); ?

like image 198
qwertzguy Avatar answered Oct 24 '22 11:10

qwertzguy