I am trying to learn GWT by putting a GWT front end on and existing
application which already has a web (HTML and JavaScript) fornt end.

I have a page coded with the visible widgets.  I now want to code
behavior into the buttons, etc.

I have a "clear" button.  When clicked, I want it to setText on the
TextBoxes on this page to "".  I have this code:

        final Button clearButton = new Button("Clear", new ClickListener() {
                public void onClick(Widget sender) {
                    locationEntry.setText("");
                    nameEntry.setText("");
                    nbrEmps.setText("");
                    price.setText("");
                    custID.setText("");
                }

... Which doesn't work because it (Netbeans IDE) says of the first two
TextBoxes (locationEntry and nameEntry) that "local variable accessed
from within inner class; needs to be declared 'final'".  Well, I
obviously cannot make these TextBoxes final and still enter text into
them from the GUI.  Of the other three TextBoxes it says it cannot
find the symbol "method setText" on these TextBoxes.  Now I don't know
for sure why the error notation is different across these five
TextBoxes, but the first 2 are defined earlier in the code and the
last three are defined later (south of this anonymous class) in the
code.

How is the right way to get this done?  Surely this is a common
requirement.

Thanks for help.

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