Announcement
Collapse
No announcement yet.
X
-
This has been fixed in SmartGWT 5.0 / SmartClient 10.0 for builds dated June 25 and later
-
Hi Isomorphic,
we also get this exception (java.lang.NullPointerException: null
at com.smartgwt.client.widgets.grid.ListGridEditorContext.<init>(ListGridEditorContext.java:23)). We use version 10.0-p20160615.
Can you, please, port this fix also to 10.0? Upgrading to 10.1 would be really hard for us, so having this fix in 10.0 would really help us.
Thanks in advance!
Best regards,
Iaroslav Mazai
Leave a comment:
-
Hi Isomorphic,
I can confirm that it is fixed using the testcase and v10.1p_2016-04-05.
Thank you & Best regards
Blama
Leave a comment:
-
Hi Isomorphic,
my last sentence "I did not see anything fail in DevMode and working in Compiled Mode, so far." I meant that I never had the case before that code worked in compiled mode and threw exceptions in Development Mode.
I do have the problem in my application using FF26 Dev Mode and in the Testcase using FF26 Dev Mode.
I do not have the problem in my application in Complied Mode.
I did not test the Testcase in Complied Mode.
I tested using v10.1p_2016-03-22,Simplicity skin and this testcase (c&p from #7):
Please change this in animals.ds.xml (see the length="500"):
BuiltInDS.java:Code:<field name="status" title="Endangered Status" type="text" length="500" />
Code:package com.smartgwt.sample.client; import java.util.LinkedHashMap; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.data.AdvancedCriteria; import com.smartgwt.client.data.Criterion; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.data.SortSpecifier; import com.smartgwt.client.types.OperatorId; 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.form.fields.FormItem; import com.smartgwt.client.widgets.form.fields.SelectItem; import com.smartgwt.client.widgets.form.fields.StaticTextItem; import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridEditorContext; import com.smartgwt.client.widgets.grid.ListGridEditorCustomizer; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS implements EntryPoint { private VLayout mainLayout; private IButton recreateBtn; public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); mainLayout = new VLayout(20); mainLayout.setWidth100(); mainLayout.setHeight100(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { recreate(); } }); mainLayout.addMember(recreateBtn); recreate(); mainLayout.draw(); } private void recreate() { Window w = new Window(); w.setWidth("95%"); w.setHeight("95%"); w.setMembersMargin(0); w.setModalMaskOpacity(70); w.setTitle("ListGrid-editRow FormItems get ListGrid CSS classes when normal editor is TextAreaItem"); w.setShowMinimizeButton(false); w.setIsModal(true); w.setShowModalMask(true); w.centerInPage(); final ListGrid animalsGrid = new ListGrid(); animalsGrid.setHeight100(); animalsGrid.setAutoFetchData(false); animalsGrid.setCanEdit(true); animalsGrid.setDataSource(DataSource.get("animals")); animalsGrid.setCanGroupBy(false); animalsGrid.setShowRecordComponents(false); animalsGrid.setShowRecordComponentsByCell(false); ListGridField commonName = new ListGridField("commonName"); commonName.setCanEdit(false); ListGridField scientificName = new ListGridField("scientificName"); scientificName.setCanEdit(false); ListGridField lifeSpan = new ListGridField("lifeSpan"); ListGridField status = new ListGridField("status"); ListGridField diet = new ListGridField("diet"); diet.setCanEdit(false); animalsGrid.setEditorCustomizer(new ListGridEditorCustomizer() { public FormItem getEditor(ListGridEditorContext context) { ListGridField field = context.getEditField(); String animal = context.getEditedRecord().getAttributeAsString("commonName"); switch (animal) { case "Anteater": switch (field.getName()) { case "lifeSpan": return new StaticTextItem(); case "status": return new SelectItem() { { setValueMap(new LinkedHashMap<String, String>() { private static final long serialVersionUID = 1L; { put("Y", "Yes"); put("N", "No"); } }); } }; default: return context.getDefaultProperties(); } case "Arabian Camel": switch (field.getName()) { case "lifeSpan": return new StaticTextItem(); case "status": return new TextItem(); default: return context.getDefaultProperties(); } default: return context.getDefaultProperties(); } } }); animalsGrid.setFields(commonName, scientificName, lifeSpan, status, diet); animalsGrid.setSort(new SortSpecifier[] { new SortSpecifier(commonName.getName(), SortDirection.ASCENDING) }); animalsGrid.fetchData(new AdvancedCriteria(new Criterion("commonName", OperatorId.STARTS_WITH, "A"))); w.addItem(animalsGrid); w.show(); } }[B][/B]
Double click a row in Development Mode to see the exception thrown multiple times and the original display issue as in versions before your change.
Double click a row in Complied Mode to see that your change fixes the original issue in Compiled Mode.
Best regards
Blama
Leave a comment:
-
We're not really following - your last line says you see no failures in DevMode, and it's working in compiled mode...
Can you please restate from scratch the situation as it stands now - what problems you still have, what modes and browsers you see them in, and the current code that reproduces them.
Leave a comment:
-
Hi Isomorphic,
only post #14 is Dev Mode specific, the original issue showed up everywhere.
After your change from #13 it is only happening in Dev Mode (broken design from the original issue plus the new exception in Dev Mode that was not there before).
Does that answer your questions?
I did not see anything fail in DevMode and working in Compiled Mode, so far.
Best regards
Blama
Leave a comment:
-
Can you clarify when you're actually seeing the problem here?
It seems as though you're saying you see these issues *only* in FF26 and in legacy Dev Mode, but not anywhere else - is that correct? Are the stack-traces Dev-mode specific, or is the entire issue Dev-mode specific?
Leave a comment:
-
Hi Isomorphic,
using v10.1p_2016-03-20, it seems to be working in my application, but not the testcase. The testcase (using Simplicity and the .ds.xml addition) shows the same issue as before and also this error for about 20x when starting the rowEditor with a double-click:
Tested in FF26 Dev Mode.Code:11:21:40.176 [ERROR] [builtinds] Uncaught exception escaped java.lang.NullPointerException: null [B]at com.smartgwt.client.widgets.grid.ListGridEditorContext.<init>(ListGridEditorContext.java:23)[/B] at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) 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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:341) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:222) 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.GeneratedMethodAccessor43.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)
In my application (deployed FF26, GC49, IE Edge 13) I do not see any errors in the Developer Console Logs, but do see the same error in FF26 Dev Mode.
Best regards
Blama
Leave a comment:
-
Will do so. Do you have the addition to the ds.xml as well? It is necessary to provoke the error.
Leave a comment:
-
We don't see the issue you note with your sample code against the latest framework code and Simplicity skin.
Can you retry this with the latest build? Making sure that you're using the skin from that build.
If you still see it, please let us know the styles in use, before and after you see that effect - the style in your second image looks unset.Last edited by Isomorphic; 14 Mar 2016, 14:13.
Leave a comment:
-
Hi Isomorphic,
can you reproduce the issue with the provided testcase?
Best regards
Blama
Leave a comment:
Leave a comment: