Re: Broken editor type conversions in GWT trunk r10227
No response on this?? i am also facing similar problem On May 26, 6:42 pm, Miroslav Genov mge...@gmail.com wrote: Hello, I'm trying to use trunk version of GWT but I'm encountering some conversion issues with the Editor framework. Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.google.gwt.text.shared.testing.PassthroughRenderer.render(PassthroughRe nderer.java:1) at com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:394) at com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:389) at com.google.gwt.editor.ui.client.adapters.ValueBoxEditor.setValue(ValueBoxEd itor.java:106) at com.google.gwt.editor.client.impl.Refresher.visit(Refresher.java:45) at com.google.gwt.editor.client.impl.Initializer.visit(Initializer.java:49) at com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEd itorContext.java:128) at com.clouway.requestfactory.app.client.CustomerEditor_RequestFactoryEditorDe legate.accept(CustomerEditor_RequestFactoryEditorDelegate.java:54) at com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEd itorContext.java:129) at com.clouway.requestfactory.app.client.CustomerEditorWorkflow_DriverImpl.acc ept(CustomerEditorWorkflow_DriverImpl.java:6) at com.google.gwt.editor.client.impl.BaseEditorDriver.doEdit(BaseEditorDriver. java:92) at com.google.web.bindery.requestfactory.gwt.client.impl.AbstractRequestFactor yEditorDriver.edit(AbstractRequestFactoryEditorDriver.java:178) The AbstractEditorDriverGenerator is generating different AbstractEditorContext for each property of the entity, so the following declaration: @UiField ValueBoxEditorDecoratorInteger age; Age: e:ValueBoxEditorDecorator ui:field=age e:valuebox g:TextBox/ /e:valuebox /e:ValueBoxEditorDecorator generates AbstractEditorContext for age field as @Override public Class getEditedType() { return java.lang.Integer.class;} @Override public java.lang.Integer getFromModel() { return (parent != null true) ? parent.getAge() : null; } And here is the problem, the TextBoxBase class is using the default PassthroghtParser (of type String) protected TextBoxBase(Element elem) { super(elem, PassthroughRenderer.instance(), PassthroughParser.instance());} which is causing the provided exception. Any idea how I can make it working ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Broken editor type conversions in GWT trunk r10227
You need to use IntegerBox if you are editing an Integer field, I believe. e:valuebox g:IntegerBox / /e:valuebox On Tue, Jul 19, 2011 at 1:22 PM, Nachiket patel.nachike...@gmail.com wrote: No response on this?? i am also facing similar problem On May 26, 6:42 pm, Miroslav Genov mge...@gmail.com wrote: Hello, I'm trying to use trunk version of GWT but I'm encountering some conversion issues with the Editor framework. Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.google.gwt.text.shared.testing.PassthroughRenderer.render(PassthroughRe nderer.java:1) at com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:394) at com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:389) at com.google.gwt.editor.ui.client.adapters.ValueBoxEditor.setValue(ValueBoxEd itor.java:106) at com.google.gwt.editor.client.impl.Refresher.visit(Refresher.java:45) at com.google.gwt.editor.client.impl.Initializer.visit(Initializer.java:49) at com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEd itorContext.java:128) at com.clouway.requestfactory.app.client.CustomerEditor_RequestFactoryEditorDe legate.accept(CustomerEditor_RequestFactoryEditorDelegate.java:54) at com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEd itorContext.java:129) at com.clouway.requestfactory.app.client.CustomerEditorWorkflow_DriverImpl.acc ept(CustomerEditorWorkflow_DriverImpl.java:6) at com.google.gwt.editor.client.impl.BaseEditorDriver.doEdit(BaseEditorDriver. java:92) at com.google.web.bindery.requestfactory.gwt.client.impl.AbstractRequestFactor yEditorDriver.edit(AbstractRequestFactoryEditorDriver.java:178) The AbstractEditorDriverGenerator is generating different AbstractEditorContext for each property of the entity, so the following declaration: @UiField ValueBoxEditorDecoratorInteger age; Age: e:ValueBoxEditorDecorator ui:field=age e:valuebox g:TextBox/ /e:valuebox /e:ValueBoxEditorDecorator generates AbstractEditorContext for age field as @Override public Class getEditedType() { return java.lang.Integer.class;} @Override public java.lang.Integer getFromModel() { return (parent != null true) ? parent.getAge() : null; } And here is the problem, the TextBoxBase class is using the default PassthroghtParser (of type String) protected TextBoxBase(Element elem) { super(elem, PassthroughRenderer.instance(), PassthroughParser.instance());} which is causing the provided exception. Any idea how I can make it working ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Broken editor type conversions in GWT trunk r10227
Hello, I'm trying to use trunk version of GWT but I'm encountering some conversion issues with the Editor framework. Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.google.gwt.text.shared.testing.PassthroughRenderer.render(PassthroughRenderer.java:1) at com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:394) at com.google.gwt.user.client.ui.ValueBoxBase.setValue(ValueBoxBase.java:389) at com.google.gwt.editor.ui.client.adapters.ValueBoxEditor.setValue(ValueBoxEditor.java:106) at com.google.gwt.editor.client.impl.Refresher.visit(Refresher.java:45) at com.google.gwt.editor.client.impl.Initializer.visit(Initializer.java:49) at com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEditorContext.java:128) at com.clouway.requestfactory.app.client.CustomerEditor_RequestFactoryEditorDelegate.accept(CustomerEditor_RequestFactoryEditorDelegate.java:54) at com.google.gwt.editor.client.impl.AbstractEditorContext.traverse(AbstractEditorContext.java:129) at com.clouway.requestfactory.app.client.CustomerEditorWorkflow_DriverImpl.accept(CustomerEditorWorkflow_DriverImpl.java:6) at com.google.gwt.editor.client.impl.BaseEditorDriver.doEdit(BaseEditorDriver.java:92) at com.google.web.bindery.requestfactory.gwt.client.impl.AbstractRequestFactoryEditorDriver.edit(AbstractRequestFactoryEditorDriver.java:178) The AbstractEditorDriverGenerator is generating different AbstractEditorContext for each property of the entity, so the following declaration: @UiField ValueBoxEditorDecoratorInteger age; Age: e:ValueBoxEditorDecorator ui:field=age e:valuebox g:TextBox/ /e:valuebox /e:ValueBoxEditorDecorator generates AbstractEditorContext for age field as @Override public Class getEditedType() { return java.lang.Integer.class; } @Override public java.lang.Integer getFromModel() { return (parent != null true) ? parent.getAge() : null; } And here is the problem, the TextBoxBase class is using the default PassthroghtParser (of type String) protected TextBoxBase(Element elem) { super(elem, PassthroughRenderer.instance(), PassthroughParser.instance()); } which is causing the provided exception. Any idea how I can make it working ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] Re: Broken editor type conversions in GWT trunk r10227
TextBox is for editing String (it's a IsEditorLeafValueEditorString), use an IntegerBox for Integers (IsEditorLeafValueEditorInteger). (and this group is for contributors to GWT, use http://groups.google.com/group/google-web-toolkit for support questions) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Отг: Re: Broken editor type conversions in GWT trunk r10227
Ah my mistake. Sorry about that post, but I wasn't sure where the problem is with my usage or some GWT issue. Thats why I posted it on both groups. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors