Hi Isomorphic,
right click on the header causes this problem:
Using v12.0p_2019-01-21/PowerEdition Deployment (built 2019-01-21).
Best regards
Pavo
right click on the header causes this problem:
Code:
10:33:50.279 [ERROR] [builtinds] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(5700), JavaScript object(3543), JavaScript object(5701)]): _1.getParentElement is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:299) at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368) at java.lang.Thread.run(Unknown Source)
Code:
package com.smartgwt.sample.client; import java.util.ArrayList; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.smartgwt.client.Version; import com.smartgwt.client.bean.BeanFactory; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.data.ResultSet; import com.smartgwt.client.data.SortSpecifier; import com.smartgwt.client.types.SortDirection; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.grid.HeaderSpan; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS extends VLayout implements EntryPoint { private IButton recreateBtn; public void onModuleLoad() { GWT.create(BeanFactory.FormItemMetaFactory.class); KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); setWidth100(); setHeight100(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { new MyWindow().show(); } }); addMember(recreateBtn); new MyWindow().show(); draw(); } private class MyWindow extends Window { public MyWindow() { setWidth(600); setHeight(300); setMembersMargin(0); setModalMaskOpacity(70); setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")"); setShowMinimizeButton(false); setIsModal(true); setShowModalMask(true); centerInPage(); final ListGrid lg = new ListGrid() { { setDataSource("animals"); ResultSet rsProperties = new ResultSet(); rsProperties.setUseClientFiltering(false); setDataProperties(rsProperties); ArrayList<HeaderSpan> headerSpanList = new ArrayList<HeaderSpan>(); ListGridField commonNameLGF = new ListGridField("commonName"); ListGridField scientificNameLGF = new ListGridField("scientificName"); ListGridField informationLGF = new ListGridField("information"); headerSpanList.add(new HeaderSpan("Header", new String[] { "commonName", "scientificName", "information" })); setHeaderSpans(headerSpanList.toArray(new HeaderSpan[headerSpanList.size()])); setFields(commonNameLGF, scientificNameLGF, informationLGF); setInitialSort(new SortSpecifier("commonName", SortDirection.ASCENDING)); fetchData(); } }; addItem(lg); } } }
Pavo
Comment