Button removeStockButton = new Button("x");
        removeStockButton.addStyleDependentName("remove");
        removeStockButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                removeStock(symbol);
            }
        });
        stocksFlexTable.setWidget(row, 3, removeStockButton);


try this it works




On Wed, Jan 4, 2012 at 4:09 PM, ang <[email protected]> wrote:

> Hi to everybody,
> j'm new to gtw (sorry for my english) I have a problem with the
> tutorial in question ... in step 5
>
> [url]http://code.google.com/intl/it-IT/webtoolkit/doc/1.6/tutorial/
> codeclient.html[/url]
>
> how come when I click on button remove the symbol variable contains
> the value corresponding to the  table row?
>
> [code]
> ..
> ...
> // Add a button to remove this stock from the table.
>    Button removeStockButton = new Button("x");
>    removeStockButton.addClickHandler(new ClickHandler() {
>      public void onClick(ClickEvent event) {
>        int removedIndex = stocks.indexOf(symbol);
>        stocks.remove(removedIndex);
>        stocksFlexTable.removeRow(removedIndex + 1);
>      }
>    });
>    stocksFlexTable.setWidget(row, 3, removeStockButton);
>
>
> [/code]
>
> --
> 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.
>
>


-- 
with best regards,

Amrutha

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