Hi,
I'm trying to change the section header style for a particular SectionStack.
I declare it as follows in a JavaScript file that is loaded first thing in the EntryPoint:
And I use it as follows in a class instantiated later in the EntryPoint:
However, my application does not load and I get the following error:
It does work if I use the following code in the JavaScript file mentioned earlier and omit the setSectionHeaderClass() call:
But this would then change the default for all SectionStacks - I only want to change it for a particular one.
Am I using setSectionHeaderClass() correctly?
GWT Version: 2.0.3
SmartGWT Version: 2.1
Browser: Google Chrome 5.0.375.55
I'm trying to change the section header style for a particular SectionStack.
I declare it as follows in a JavaScript file that is loaded first thing in the EntryPoint:
Code:
isc.defineClass("MySectionHeader", "ImgSectionHeader").addProperties({ icon: "image/myimage.png" });
Code:
final SectionStack stack = new SectionStack(); stack.setSectionHeaderClass("MySectionHeader");
Code:
com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'createRaw' of null stack: TypeError: Cannot call method 'createRaw' of null at Object.addSections (http://10.249.30.111:8888/myapp/sc/modules/ISC_Foundation.js:857:390) at Object.initWidget (http://10.249.30.111:8888/myapp/sc/modules/ISC_Foundation.js:833:112) at Object.init (http://10.249.30.111:8888/myapp/sc/modules/ISC_Core.js:1791:6) at Object.completeCreation (http://10.249.30.111:8888/myapp/sc/modules/ISC_Core.js:310:6) at Object.<anonymous> (http://10.249.30.111:8888/myapp/sc/modules/ISC_Core.js:200:636) at [object Object].<anonymous> (unknown source) at __gwt_jsInvoke (http://10.249.30.111:8888/myapp/hosted.html?myapp:70:35) at http://10.249.30.111:8888/myapp/hosted.html?myapp:263:16 at z (http://10.249.30.111:8888/myapp/myapp.nocache.js:2:145) at http://10.249.30.111:8888/myapp/myapp.nocache.js:8:698 type: non_object_property_call arguments: createRaw, __gwt_ObjectId: 446 at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.smartgwt.client.widgets.layout.SectionStack.create(SectionStack.java) at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:343) at com.smartgwt.client.widgets.layout.Layout.addMember(Layout.java:968) at myapp.client.widget.StackSample.getContent(StackSample.java:51) at myapp.client.ShowcaseEntryPoint.createCategoryTab(ShowcaseEntryPoint.java:191) at myapp.client.ShowcaseEntryPoint.onModuleLoad(ShowcaseEntryPoint.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:595)
Code:
isc.defineClass("MySectionHeader", "ImgSectionHeader").addProperties({ icon: "image/myimage.png" }); isc.SectionStack.addProperties({ sectionHeaderClass: "MySectionHeader", });
Am I using setSectionHeaderClass() correctly?
GWT Version: 2.0.3
SmartGWT Version: 2.1
Browser: Google Chrome 5.0.375.55
Comment