Hi all ...

    i'm trying to do an interface of a little web system on gwt . I have two
Form buttons  (GWT-Ext) that have a Buttonlisteneradapter each one. In order
to do this i'm creating a new class extending the ButtonListenerAdapter
class by each button , with a constructor that receive the EntryPoint as
argument (Matisse style) . After i compile and run the project  the buttons
doesn't do anything ... so , should i modify my .gwt.xml file to add the new
class or it simply can't do that inheritance?

here is some code :


public class MainEntryPoint implements EntryPoint {

... constructors and global variables

    public void saveOnClick(Button button, EventObject e){}

    public void cancelOnClick(Button button, EventObject e){
        this.txtIdOrder.setValue("");
        MessageBox.alert("cancel button pressed");
    }

public void onModuleLoad() {
         int paddingCenter = (RootPanel.get().getOffsetWidth()-800)/2;

        ..... interface setup

       ... Listener's assignation

         save = new Button("Buscar", new SaveButtonListenerAdapter(this));
         formPanel.addButton(save);
         cancel = new Button("Limpiar Formulario",new
SaveButtonListenerAdapter(this));
         formPanel.addButton(cancel);

}


    class SaveButtonListenerAdapter extends ButtonListenerAdapter {
        MainEntryPoint parent;

        public SaveButtonListenerAdapter(MainEntryPoint ep){
            this.parent = ep;
        }

        public void onClick(Button button, EventObject e) {
            this.parent.saveOnClick(button, e);
        }
    }

    class CancelButtonListenerAdapter extends ButtonListenerAdapter {
        MainEntryPoint parent;

        public CancelButtonListenerAdapter(MainEntryPoint ep){
            this.parent = ep;
        }

        public void onClick(Button button, EventObject e) {
            this.parent.cancelOnClick(button, e);
        }

    }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to