I have a project that has been using smart gwt for over 4 years now. It started on release 1.3. I'm currently on the LGPL Edition release 4.0(just download latest patch) and am using gwt 2.5.1(using eclipse as well). I'm using IE9 as the browser. My problem is that when I edit a cell in a listgrid and use the backspace key followed by a return, the backspace key is ignored. The return key simply causes the cell to reappear with the old value. I took the showcase listgrid example, created a simple project in eclipse and the editor worked just fine.
I call basically the same class from my project entry point and the editor doesn't work. We had a problem with textbox as well, but were able to fix once I realized that the backspace key fires onkeyup instead of onkeychange. I can't use a similar fix for the ListGrid, so I'm trying to solve the real problem now.
The one main difference between the showcase project and mine is that my themes are old. Would this cases the problem? Just looking for any hints at what might be causing the problem. I can include other project details. I just don't know what might be helpful.
Another observation that I had about the simple showcase project vs mine, is that the showcase default behavior for a tab key was to move to next cell whereas my project defaulted to editor exit.
Any help would be appreciated
As an update, I've discovered that the following code was the root cause of my problem. Now I have to figure out how to make it work without impacting the listgrid editor.
private native void initHelpSupportJS(MainWindow pl) /*-{
$wnd.helpSupport = function (event) {
if (!!pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::activeHelpPopUp){
pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::helpSupportJS()();
}
if (!!pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::cancellableHelp) {
if(!!event && !!event.preventDefault) {
pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::helpSupportJS()();
event.preventDefault();
}
}
};
$wnd.document.onclick = $wnd.helpSupport;
$wnd.document.onkeydown = function(event) {
event = event || $wnd.event;
if (event.keyCode == 27) {
$wnd.helpSupport(event);
}
};
$wnd.defaultContextMenuHandler = $wnd.document.oncontextmenu;
}-*/;
I call basically the same class from my project entry point and the editor doesn't work. We had a problem with textbox as well, but were able to fix once I realized that the backspace key fires onkeyup instead of onkeychange. I can't use a similar fix for the ListGrid, so I'm trying to solve the real problem now.
The one main difference between the showcase project and mine is that my themes are old. Would this cases the problem? Just looking for any hints at what might be causing the problem. I can include other project details. I just don't know what might be helpful.
Another observation that I had about the simple showcase project vs mine, is that the showcase default behavior for a tab key was to move to next cell whereas my project defaulted to editor exit.
Any help would be appreciated
As an update, I've discovered that the following code was the root cause of my problem. Now I have to figure out how to make it work without impacting the listgrid editor.
private native void initHelpSupportJS(MainWindow pl) /*-{
$wnd.helpSupport = function (event) {
if (!!pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::activeHelpPopUp){
pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::helpSupportJS()();
}
if (!!pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::cancellableHelp) {
if(!!event && !!event.preventDefault) {
pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::helpSupportJS()();
event.preventDefault();
}
}
};
$wnd.document.onclick = $wnd.helpSupport;
$wnd.document.onkeydown = function(event) {
event = event || $wnd.event;
if (event.keyCode == 27) {
$wnd.helpSupport(event);
}
};
$wnd.defaultContextMenuHandler = $wnd.document.oncontextmenu;
}-*/;
Comment