Hello,
I have a problem with a RadioGroupItem.
I use the method setValueDisabled for disabling one radiobutton.
After calling that method I cannot select one of the other buttons anymore either (they are shown correctly).
In the console I get the following error when I try to click on one of the enabled RadioButtons:
So, obviously the size of the disabled RadioButton changes, but does anyone know how I can fix that?
Here ist my sample code:
Thanks, GG
SmartGWT: 3.1
GWT: 2.5
browser: Firefox 10.0.8
I have a problem with a RadioGroupItem.
I use the method setValueDisabled for disabling one radiobutton.
After calling that method I cannot select one of the other buttons anymore either (they are shown correctly).
In the console I get the following error when I try to click on one of the enabled RadioButtons:
00:08:26,652 [ERROR] 13:54:23.802:TMR9:WARN:RadioItem:isc_RadioItem_0[$540Item 1]:Width now:196
com.smartgwt.client.core.JsObject$SGWT_WARN: 13:54:23.802:TMR9:WARN:RadioItem:isc_RadioItem_0[$540Item 1]:Width now:196 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) 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:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.smartgwt.client.widgets.BaseWidget.getInnerHTML(BaseWidget.java) 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:597) 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(Thread.java:662)
com.smartgwt.client.core.JsObject$SGWT_WARN: 13:54:23.802:TMR9:WARN:RadioItem:isc_RadioItem_0[$540Item 1]:Width now:196 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) 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:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.smartgwt.client.widgets.BaseWidget.getInnerHTML(BaseWidget.java) 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:597) 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(Thread.java:662)
Here ist my sample code:
Code:
public class SmartGwtTests implements EntryPoint { public void onModuleLoad() { getRadioGroupPanel().draw(); } private HLayout getRadioGroupPanel(){ HLayout layout = new HLayout(5); DynamicForm form = new DynamicForm(); form.setWidth(220); form.setHeight(35); final RadioGroupItem group = new RadioGroupItem(); group.setShowTitle(false); group.setVertical(false); group.setWidth(200); group.setValueMap("Item 1", "Item 2", "Item 3"); form.setFields(group); layout.addMember(form); final Button btn = new Button("disable Item 1"); btn.setWidth(100); btn.setHeight(25); btn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (btn.getTitle().startsWith("disable")){ group.setValueDisabled("Item 1", true); btn.setTitle("enable Item 1"); } else{ group.setValueDisabled("Item 1", false); btn.setTitle("disable Item 1"); } } }); layout.addMember(btn); return layout; } }
SmartGWT: 3.1
GWT: 2.5
browser: Firefox 10.0.8
Comment