PDA

View Full Version : RowEditor limited access



zdarsky
7 Aug 2009, 12:04 AM
Hi,
I'd like to know whether a rowEditor is currently editing.

I was wondering why there are private fields in RowEditor.java rather than protected. Such as

private boolean editing;
private int rowIndex;
private Grid<M> grid;

or at least there could be getters method...:-?

sven
7 Aug 2009, 1:22 AM
Moved this to the help forum as this is not really a softwarebug. You could use JSNI to access these fields.

zdarsky
10 Aug 2009, 3:08 AM
Does anybody know how to implement the method isEditable?

publicclass MyRowEditor<M extends ModelData> extends RowEditor<M> {
public native boolean isEditing() /*-
-*/
}

zdarsky
10 Aug 2009, 5:33 AM
Hi all,

I've found it out.


public native boolean isEditing() /*-{


return this.@com.extjs.gxt.ui.client.widget.grid.RowEditor::editing;

}-*/;

micgala
24 Sep 2009, 5:56 AM
Does anyone know how to do this in the opposite direction?

suppose I want to do a setEditing.

How do I set the variable via jsni?

Tks for helping,
Michel.

sven
24 Sep 2009, 5:59 AM
public native void setEditing(booloean edit) /*-{
this.@com.extjs.gxt.ui.client.widget.grid.RowEditor::editing=edit;
}-*/;

micgala
24 Sep 2009, 6:26 AM
ah, pretty simple then.

Tks Sven.

Regards,
Michel.