我正在使用 gwt 和 smart gwt 的组合。但是,每当我的页面加载时,我都会收到以下错误。请帮我解决这个问题。. 请找到随附的屏幕截图以获取相同的弹出错误图像
15:06:02.097 [ERROR] [detectfiles] 15:06:02.097:TMR5:WARN:Log:Error:
'Object required'
in /sc/modules/ISC_Core.js
at line 1782
[c]Element.getOffsetLeft(_1=>[DIVElement]{ID:isc_0})
[c]Element.getOffset(_1=>"left", _2=>[ImgButton ID:isc_ImgButton_0], _3=>undef, _4=>false, _5=>true)
Canvas.getLeftOffset(_1=>undef)
Canvas.getPageLeft()
Canvas.$414(null, undef)
[c]Page.handleEvent(_1=>null, _2=>"resize", _3=>undef)
[c]EventHandler.$78p(_1=>"landscape")
[c]EventHandler.$hr(_1=>undef)
callback(undefined=>undef)
"isc.EH.$hr()"
[c]Class.fireCallback(_1=>"isc.EH.$hr()", _2=>undef, _3=>Array[0], _4=>Obj{length:2}, _5=>true) on [Class Timer]
[c]Timer.$in(_1=>"$ir28")
anonymous()
"isc.Timer.$in('$ir28')"
com.smartgwt.client.core.JsObject$SGWT_WARN: 15:06:02.097:TMR5:WARN:Log:Error:
'Object required'
in /sc/modules/ISC_Core.js
at line 1782
[c]Element.getOffsetLeft(_1=>[DIVElement]{ID:isc_0})
[c]Element.getOffset(_1=>"left", _2=>[ImgButton ID:isc_ImgButton_0], _3=>undef, _4=>false, _5=>true)
Canvas.getLeftOffset(_1=>undef)
Canvas.getPageLeft()
Canvas.$414(null, undef)
[c]Page.handleEvent(_1=>null, _2=>"resize", _3=>undef)
[c]EventHandler.$78p(_1=>"landscape")
[c]EventHandler.$hr(_1=>undef)
callback(undefined=>undef)
"isc.EH.$hr()"
[c]Class.fireCallback(_1=>"isc.EH.$hr()", _2=>undef, _3=>Array[0], _4=>Obj{length:2}, _5=>true) on [Class Timer]
[c]Timer.$in(_1=>"$ir28")
anonymous()
"isc.Timer.$in('$ir28')"
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:662)
这是一段代码,我在弹出窗口中使用 TreeGrid
private PopupPanel createConsoPopup() {
final PopupPanel consoPopup = new PopupPanel();
consoPopup.setAnimationEnabled(true);
consoPopup.setAutoHideEnabled(true);
VerticalPanel consoContent = new VerticalPanel();
VEPConsoTree consoTree = new VEPConsoTree(lineTreeNode, vepConsoTree);
vepConsoTree = consoTree.getCheckStationTree();
vepConsoTree.addSelectionChangedHandler(new SelectionChangedHandler() {
@Override
public void onSelectionChanged(SelectionEvent event) {
((TextBox)flexTable.getWidget(selectedRowNum, 0)).setText(vepConsoTree.getSelectedRecord().getAttribute("vepAreaName")+"_"+vepConsoTree.getSelectedRecord().getAttribute("checkStationName"));
consoPopup.hide();
}
});
consoContent.add(consoTree);
consoPopup.add(consoContent);
return consoPopup;
}
以下是我的 VEPConsoTree 类:
package com.renault.veppwrstats.client;
import com.google.gwt.user.client.ui.Composite;
import com.smartgwt.client.types.TreeModelType;
import com.smartgwt.client.widgets.events.DrawEvent;
import com.smartgwt.client.widgets.events.DrawHandler;
import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeGrid;
import com.smartgwt.client.widgets.tree.TreeNode;
public class VEPConsoTree extends Composite {
private TreeNode[] lineTreeNode;
private TreeGrid vepConsoTree;
//private DFConstantsForLocale constants = GWT.create(DFConstantsForLocale.class);
/**
* @param lineTreeNode
* @param vepConsoTree
*/
public VEPConsoTree(TreeNode[] lineTreeNode, TreeGrid vepConsoTree) {
super();
this.lineTreeNode = lineTreeNode;
this.vepConsoTree = vepConsoTree;
//Grid grid = chckStatRestrictPanel();
initWidget(vepConsoTree());
}
/**
* This function creates checkStation Restriction Panel(tree) along with
* Select/Unselect All button
*
* @return
*/
private TreeGrid vepConsoTree() {
return createTreeGrid();
}
/**
* This function creates CheckStation Restriction Tree
*
* @return {@link TreeGrid}
*/
private TreeGrid createTreeGrid() {
final TreeGrid chckTreeGrid = new TreeGrid();
chckTreeGrid.setHeight("269px");
chckTreeGrid.setWidth("250px");
chckTreeGrid.setData(createChkStationTree());
//chckTreeGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
//chckTreeGrid.setShowPartialSelection(false);
//chckTreeGrid.setCascadeSelection(true);
chckTreeGrid.setFolderIcon(null);
chckTreeGrid.setNodeIcon(null);
chckTreeGrid.setShowConnectors(true);
chckTreeGrid.setShowHeader(false);
//addSelectionChangeHndler(chckTreeGrid);
chckTreeGrid.addDrawHandler(new DrawHandler() {
public void onDraw(DrawEvent event) {
chckTreeGrid.getTree().openAll();
}
});
vepConsoTree = chckTreeGrid;
return chckTreeGrid;
}
/**
* This function creates a basic tree
*/
private Tree createChkStationTree() {
Tree chckStationTree = new Tree();
chckStationTree.setModelType(TreeModelType.PARENT);
chckStationTree.setRootValue(1);
chckStationTree.setIdField("id");
chckStationTree.setOpenProperty("isOpen");
chckStationTree.setData(lineTreeNode);
chckStationTree.setParentIdField("parent");
return chckStationTree;
}
/**
* @return the vepConsoTree
*/
public final TreeGrid getCheckStationTree() {
return vepConsoTree;
}
/**
* @param vepConsoTree the vepConsoTree to set
*/
public final void setCheckStationTree(TreeGrid checkStationTree) {
this.vepConsoTree = checkStationTree;
}
/**
* @return the lineTreeNode
*/
public final TreeNode[] getLineTreeNode() {
return lineTreeNode;
}
/**
* @param lineTreeNode the lineTreeNode to set
*/
public final void setLineTreeNode(TreeNode[] lineTreeNode) {
this.lineTreeNode = lineTreeNode;
}
}