I just tried something with interesting results.

In the updateButton anonymous clickhandler class, I tried a
Window.alert attempting to output the index of the widget object w on
its containing panel. It came back -1, meaning w is not to be found.
Does this have something to do with how anonymous inner classes use
the external classes objects? Maybe a clone or something? If so, how
can i handle this?

thanks.



On Mar 20, 10:30 pm, JD <[email protected]> wrote:
> I have an AbsolutePanel with dynamically added widgets. When I click
> on one of these widgets, another panel will display some properties of
> that widget. On this property panel there are elements to change some
> of the textual info displayed on the widget and a button to update it.
> The event of the button gets called and I change the data in the
> widget object but it does not get reflected visually. Any reason why?
> Is there some kind of redraw that has to be done? Perhaps remove the
> widget and redraw it? If so, how do you remove? I tried
> panel.remove(widget) but nothing happens. Below is the method that
> gets called when a widget is clicked.
>
>     private void displayProps(final MyWidget w) {
>         propsTable = new FlexTable();
>         propsTable.setCellSpacing(3);
>         propsTable.setCellPadding(3);
>
>         // Add some standard form options
>         propsTable.setHTML(0, 0, "Name");
>         final TextBox name = new TextBox();
>         propsTable.setWidget(0, 1, name);
>         Button updateButton = new Button("Update",
>                 new ClickHandler() {
>                     public void onClick(ClickEvent event) {
>                         w.setName(name.getText());
>                     }
>                 });
>         propsTable.setWidget(0, 3, updateButton);
>     }

-- 
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.

Reply via email to