Hello,
I m working on the header context menu of listgrid with SmartGWT2.2 on Chrome/FF linux,
I noticed two errors/limitations:
1- In the Header Context Menu and submenu, I have set the height of the menu items to 50 (for bigger icons or to fit 2 lines texts) and the rollover is not adjusting properly (cf image attached). Is there a way to overcome this?
2- In the Header Context Menu, the "Columns" menu item has a submenu that contains all the fields title with checkbox if visible or not. If I try to get the items of this submenu, it crashes. If I create a submenu and try the same code, it works
sample code as bellow:
the stack trace is as follow:
Thanks for your assistance
Michael
I m working on the header context menu of listgrid with SmartGWT2.2 on Chrome/FF linux,
I noticed two errors/limitations:
1- In the Header Context Menu and submenu, I have set the height of the menu items to 50 (for bigger icons or to fit 2 lines texts) and the rollover is not adjusting properly (cf image attached). Is there a way to overcome this?
2- In the Header Context Menu, the "Columns" menu item has a submenu that contains all the fields title with checkbox if visible or not. If I try to get the items of this submenu, it crashes. If I create a submenu and try the same code, it works
sample code as bellow:
Code:
ListGrid plantsGrid = new ListGrid(){
protected MenuItem[] getHeaderContextMenuItems(final Integer fieldNum) {
final MenuItem[] items = super.getHeaderContextMenuItems(fieldNum);
Menu exportSM = new Menu();
exportSM.setItems(
new MenuItem("XML"),
new MenuItem("CSV"),
new MenuItem("Plain text"));
items[1].setSubmenu(exportSM);
exportSM.setBackgroundColor("red");
exportSM.setCellHeight(50);
// WORKING
Log.debug(logPattern+ "getSubmenu: " + items[1].getSubmenu().getItems()[0].getTitle());
// NOT WORKING ??
if (items[3].getSubmenu() != null && items[3].getSubmenu().getItems() != null)
Log.debug(logPattern+ "getSubmenu: " + items[3].getSubmenu().getItems()[0].getTitle());
return items;
}
};
Code:
Uncaught exception escaped : com.google.gwt.core.client.JavaScriptException
(TypeError): $wnd.isc[scClassName] is undefined
fileName: http://online-proxy.solarpark-online.com
lineNumber: 213
stack: ("data")@http://online-proxy.solarpark-online.com:213
@:0
([object GWTJavaObject],4658081,[object GWTJavaObject])@http://online-proxy.solarpark-online.com/stable/pvpms_fea/hosted.html?pvpms_fea:56
(3)@http://online-proxy.solarpark-online.com:2428
((function (fieldNum) {var jObj = this.__ref;var fieldNumJ = fieldNum == null ? null : __gwt_makeJavaInvoke(1)(null, 524620, fieldNum);var menuItemsJ = __gwt_makeJavaInvoke(1)(jObj, 4658081, fieldNumJ);var menuItemsJS = __gwt_makeJavaInvoke(1)(null, 524470, menuItemsJ);return menuItemsJS;}),[object Object],[object Object])@http://online-proxy.solarpark-online.com:44
@:0
(null,106,(function (fieldNum) {var jObj = this.__ref;var fieldNumJ = fieldNum == null ? null : __gwt_makeJavaInvoke(1)(null, 524620, fieldNum);var menuItemsJ = __gwt_makeJavaInvoke(1)(jObj, 4658081, fieldNumJ);var menuItemsJS = __gwt_makeJavaInvoke(1)(null, 524470, menuItemsJ);return menuItemsJS;}),[object Object],[object Object])@http://online-proxy.solarpark-online.com/stable/pvpms_fea/hosted.html?pvpms_fea:56
(3)@http://online-proxy.solarpark-online.com:28
isc_ListGrid_shouldShowHeaderMenuButton([object Object])@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Grids.js:2268
([object Object],(void 0))@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Grids.js:2229
isc_c_EventHandler_bubbleEvent([object Object],"mouseOver",(void 0))@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:1450
isc_c_EventHandler_handleEvent([object Object],"mouseOver")@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:1193
isc_c_EventHandler___handleMouseMove(null,[object Object])@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:1276
isc_c_EventHandler__handleMouseMove(null,[object Object])@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:1265
isc_c_EventHandler__delayedMouseMove(1283249209226)@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:1264
isc_c_Class_fireCallback([object Object],(void 0),[object Array],[object Object],true)@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:282
isc_c_Timer__fireTimeout("$ir143")@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:1153
@http://online-proxy.solarpark-online.com/stable/pvpms_fea/sc/modules/ISC_Core.js:1148
See the Development console log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling.
Michael
Comment