SmartClient Version: v9.0p_2013-07-14/LGPL Development Only (built 2013-07-14)
GWT 2.6.0
Firefox 26, Classic Dev Mode
Hi there,
following the CustomTile example in the showcase I'm getting the following error:
What are we doing wrong with the BeanFactory? Is more code needed to make the showcase example work? We define the Tile and the TileGrid as follows:
FotoTile.java
And the FotoTileGrid.java
GWT 2.6.0
Firefox 26, Classic Dev Mode
Hi there,
following the CustomTile example in the showcase I'm getting the following error:
Code:
14:00:24.862 [ERROR] [ns] Generator 'com.smartgwt.rebind.MetaBeanFactoryGenerator' threw an exception while rebinding 'com.arplatia.ns.client.informe.fotoPeritaje.widget.FotoTileGrid.FotoTileMetaFactory'
java.lang.NullPointerException: null
at com.smartgwt.rebind.BeanValueType.<init>(BeanValueType.java:134)
at com.smartgwt.rebind.BeanClass.getValueTypes(BeanClass.java:411)
at com.smartgwt.rebind.BeanClass.writeRegisterValueTypes(BeanClass.java:420)
at com.smartgwt.rebind.BeanClass.generateFactory(BeanClass.java:283)
at com.smartgwt.rebind.BeanClass.generateFactory(BeanClass.java:295)
at com.smartgwt.rebind.MetaBeanFactoryGenerator.generate(MetaBeanFactoryGenerator.java:113)
at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:676)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:147)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:600)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.shared.GWT.create(GWT.java:72)
at com.google.gwt.core.client.GWT.create(GWT.java:86)
at com.arplatia.ns.client.informe.fotoPeritaje.widget.FotoTileGrid.<init>(FotoTileGrid.java:19)
at com.arplatia.ns.client.informe.peritacion.widget.PeritacionWindowDynamicForm.<init>(PeritacionWindowDynamicForm.java:627)
at com.arplatia.ns.client.informe.peritacion.GestionPeritaciones.<init>(GestionPeritaciones.java:59)
at com.arplatia.ns.client.principal.PrincipalArplatiaNS$8.onClick(PrincipalArplatiaNS.java:620)
at com.smartgwt.client.widgets.menu.events.MenuItemClickEvent.dispatch(MenuItemClickEvent.java:102)
at com.smartgwt.client.widgets.menu.events.MenuItemClickEvent.dispatch(MenuItemClickEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:228)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.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:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
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:347)
at sun.reflect.GeneratedMethodAccessor64.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:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source)FotoTile.java
Code:
public class FotoTile extends DynamicForm {
public FotoTile() {
StaticTextItem pictureItem = new StaticTextItem("nombre");
pictureItem.setShowTitle(false);
pictureItem.setCanEdit(false);
pictureItem.setImageURLPrefix("ns?thumbnail=true&filename=");
pictureItem.setShowValueIconOnly(true);
pictureItem.setValueIconHeight(150);
pictureItem.setValueIconWidth(150);
pictureItem.setValueIconMapper(new ValueIconMapper() {
@Override
public String getValueIcon(Object value) {
return String.valueOf(value);
}
});
// More fields and buttons
setFields(pictureItem);
}
}Code:
public interface FotoTileMetaFactory extends BeanFactory.MetaFactory {
BeanFactory<FotoTile> getFotoTileFactory();
}
public FotoTileGrid() {
GWT.create(FotoTileMetaFactory.class);
// Configurar TileGrid
setDataSource(FotoDS.getInstance());
setTileWidth(TILE_SIZE);
setTileHeight(TILE_SIZE);
// setTileConstructor() is not resolved, I don't know why
setAttribute("tileConstructor", "FotoTileMetaFactory", false);
}