PDA

View Full Version : RowEditor need expose a function to get the value of "editing"



mikeshi
9 Feb 2010, 11:20 PM
I need to extend RowEditor as my own specif. I found it is almost impossible in GXT 2.1.0, but it became much easier to do that in GXT 2.1.1 since some fields have been defined as "protected" not "private". However, the field "editing" is still "private", it makes class inheritance inconvient because I can not get the editing status in subclass. Could you please add the new functions to make it possible?:D

micgala
10 Feb 2010, 12:41 AM
Hi.

Meanwhile, you can have access to it via JSNI.

mikeshi
10 Feb 2010, 1:41 AM
Thank you, but isn't it too advanced?:D After all, I just want to access a field from super class.

micgala
10 Feb 2010, 2:04 AM
Well, since the field is private, there is no other way to access it.

This is how:

Just extend the RowEditor (for example), and add this:



public native boolean getEditing() /*-{
return this.@com.extjs.gxt.ui.client.widget.grid.RowEditor::editing;
}-*/;
Regards,
Michel.

mikeshi
10 Feb 2010, 6:46 AM
Well, since the field is private, there is no other way to access it.

This is how:

Just extend the RowEditor (for example), and add this:



public native boolean getEditing() /*-{
return this.@com.extjs.gxt.ui.client.widget.grid.RowEditor::editing;
}-*/;
Regards,
Michel.

Thank you very much, it is the best way so far since it is the private field in super class.