PDA

View Full Version : Submit grid panel with chackbox selection model



marco76
5 Feb 2008, 10:23 AM
Hi
I have a grid panel with checkbox selction mode.
Now this grid is a part of a form panel that I would submit.
How can I Incorporate the grid inside the data pass with the form?
Many thanks

marco76
7 Feb 2008, 2:35 AM
can anyone help me?

sfwalter
7 Feb 2008, 4:35 AM
How are determining which records to send back to the server? Do you just want the modified records? You will need to encode the data from the grid and put the encoded data into a hidden field (there are other ways, but hidden field is the simpliest). I usually encode my grid changes as JSON and have my server deal with the JSONed grid data.

Here is an example on how to encode the modified records of a grid:


var data = [];
modifiedRecords = grid.store.getModifiedRecords();
for(i=0;i<modifiedRecords.length;i++) {
data.push(modifiedRecords[i].data);
}

var encodedJson = Ext.encode(data);

marco76
7 Feb 2008, 5:52 AM
I have a grid panel inside a form panel.
I would submit all when I click a button.
And I would send the id of the row of the grid that I have selected

rajashekar
22 Dec 2010, 4:21 AM
hello i am new to GWTEXT i added a GridPanel in project but its not getting run its showing errors in my netbeans
like dis

so plz helpme


Validating newly compiled units
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/core/EventObject.java'
[ERROR] Line 87: Type 'long' may not be returned from a JSNI method
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/widgets/Editor.java'
[ERROR] Line 184: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 173: Parameter 'value': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/widgets/DatePicker.java'
[ERROR] Line 120: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Line 77: Type 'long' may not be returned from a JSNI method
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Line 104: Parameter 'time': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/widgets/form/DateField.java'
[ERROR] Line 99: Parameter 'time': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Line 103: Type 'long' may not be returned from a JSNI method
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/util/Format.java'
[ERROR] Line 95: Parameter 'size': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/util/JavaScriptObjectHelper.java'
[ERROR] Line 143: Parameter 1 of method 'com.gwtext.client.util.JavaScriptObjectHelper.toDate': type 'long' may not be passed out of JSNI code
[ERROR] Line 122: Parameter 'time': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Line 350: Parameter 'time': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/util/DateUtil.java'
[ERROR] Line 114: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 130: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Line 144: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 147: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Line 157: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 160: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Line 170: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 182: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 194: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 197: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Line 207: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 219: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 231: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 234: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Line 244: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 256: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 269: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Line 283: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/data/Record.java'
[ERROR] Line 350: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Line 365: Referencing method 'com.gwtext.client.util.DateUtil.getTime': return type 'long' is not safe to access in JSNI code
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/widgets/menu/DateMenu.java'
[ERROR] Line 54: Parameter 1 of method 'com.gwtext.client.util.DateUtil.create': type 'long' may not be passed out of JSNI code
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/core/Connection.java'
[ERROR] Line 89: Parameter 'transactionId': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Line 110: Parameter 'transactionId': type 'long' is not safe to access in JSNI code
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Line 120: Type 'long' may not be returned from a JSNI method
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Line 132: Type 'long' may not be returned from a JSNI method
For additional info see: file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwt-2.0.4/doc/helpInfo/longJsniRestriction.html
[ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/genesis/Desktop/Library/gwtext.jar!/com/gwtext/client/core/JsObject.java'
[ERROR] Line 132: Parameter 1 of method 'com.gwtext.client.util.JavaScriptObjectHelper.toLong': type 'long' may not be passed out of JSNI code
[ERROR] Line 144: Parameter 1 of method 'com.gwtext.client.util.JavaScriptObjectHelper.toDate': type 'long' may not be passed out of JSNI code
Finding entry point classes
[ERROR] Unable to find type 'org.yournamehere.client.MainEntryPoint'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
C:\Documents and Settings\genesis\My Documents\NetBeansProjects\sar\nbproject\build-gwt.xml:141: The following error occurred while executing this line:
C:\Documents and Settings\genesis\My Documents\NetBeansProjects\sar\nbproject\build-gwt.xml:290: Java returned: 1
BUILD FAILED (total time: 16 seconds)