Its hard to try to solve this problem without being able to debug the code, and Ive certainly got no time for that!
You can try to create a really small application that just creates and sets the radio buttons, so that you can proove to yourself that the functionality works. You could also try stepping through the code line by line (if you are using something like the eclipse IDE) Otherwise you could try manually stepping through your own code, very tedious and boring and you need to concentrate but its possible to do if theres not too much code to trawl through! Regarding the Asynchronos problem, this all depends if you are using RPC calls to your server to get the values for your radio buttons, but Im guessing from what you have said that you are currently hardcoding the initial values (which of course it one of the debugging steps you could have tried). The problem though can be that you create and display the radio buttons, but then the RPC call fails to update them for whatever reason, or worse yet, tries to update the radio buttons before they have even been created! Other than that I dont know enough about how you are trying to do it (or enough of the internal workings of GWT) to offer any advice on the actual order of creation etc. However its worth remembering and considering whether or not your panels or buttons are being destroyed or just merely hidden. Ive made that mistake with dialog boxes and not realising that a a call to dialogbox.hide is only hiding the dialog box, so if you try to create the dialogbox at the beginning of a function and then hide it later in the same function, later when you call the same function, it will create a new (clean) version of the same dialogbox.... On 18 February 2010 15:17, dhoffer <[email protected]> wrote: > John, > > So how do I solve this? I'm not clear on the solution you propose. > > -Dave > > On Feb 18, 7:51 am, John Denley <[email protected]> wrote: > > is it possible that this maybe an asynchronos issue, I have had that > before > > where Im displaying the radio buttons before im setting them because the > > setting of the buttons is based on a reply from the server, which is an > > asynchronous call! > > > > On 18 February 2010 14:28, Bonor <[email protected]> wrote: > > > > > It should! May be something else deselects it? > > > > > I use many radio's and I just use: > > > radio[i].setValue(true); > > > > > On 18 feb, 04:42, dhoffer <[email protected]> wrote: > > > > gwt 2.0. I've tried calling setValue(true, true) on radio buttons > but > > > > when the app is run, neither radio button is selected, what is the > > > > trick to code setting the initial value of radio buttons? > > > > > > -Dave > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google Web Toolkit" group. > > > To post to this group, send email to > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-web-toolkit%[email protected]> > <google-web-toolkit%[email protected]<google-web-toolkit%[email protected]> > > > > > . > > > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
