My guess is that summaryPageLoader.load(0, 30) invokes an RPC and you end up trying to resize the widget before the data has been loaded. If I'm right, you need to resize in the onSuccess of the RPC's AsyncCallback rather than during some arbitrary deferred command.
Ian On Mon, Apr 19, 2010 at 2:43 PM, DK <[email protected]> wrote: > I am trying to resize the height of a tab-panel based on the content > populated onto a grid. I need to defer that work until data is loaded > into the grid. Currently, I am doing the following: > > grid.addListener(Events.Attach, new > Listener<GridEvent<BeanModel>>() { > public void handleEvent(GridEvent<BeanModel> be) { > summaryPageLoader.load(0, 30); > resizeSummaryGrid(); > } > }); > > and resizeSummaryGrid() is : > > DeferredCommand.addCommand(new Command(){ > �...@override > public void execute() { > // do something here to > resize the panel > } > }); > > I am not able to resize my panel. However, If I add an alert statement > just before calling the resize method, it works just fine. What am I > doing wrong ? > > -- > 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. > > -- 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.
