Results 1 to 2 of 2

Thread: Button Listener Error

Hybrid View

  1. #1
    Join Date
    May 2012
    Posts
    7
    Rep Power
    3

    Default Button Listener Error

    HTML Code:
     this.get_rooms_button = new DwtButton ({parent:this._parentView, name:"get_rooms_button", id:"get_rooms_button", listeners: new AjxListener(this.get_rooms_button,this.get_rooms_button_listener())});
                this.get_rooms_button.setText("get rooms");
    
    com_zimbra_om.get_rooms_button_listener = function(){
        var url = ZmZimletBase.PROXY + AjxStringUtil.urlComponentEncode(com_zimbra_om._url);
        var request_url = 'http://demo.openmeetings.de/openmeetings/services/UserService/getRooms?SID=' +
                        sid ;
                            //HANDLE THE RETURNED VALUES
        AjxRpc.invoke(request_url, ["Content-Type", "application/soap+xml;charset=utf-8", "SOAPAction", "http://url/openmeetings/services/UserService/getSession"], new AjxCallback(this, this._reponseHandler, postCallback) , true);
        this._get_rooms_parentView = new DwtListView({parent:this.getShell(),noMaximize:false});
        this._get_rooms_parentView.setSize("200","200");
        this.get_rooms_dialog = this._createDialog({title:"Rooms", view:this._get_rooms_parentView, standardButtons : [DwtDialog.OK_BUTTON]});
        this.get_rooms_dialog.setButtonListener(DwtDialog.OK_BUTTON, new AjxListener(this, this._okBtnListner));
        this.get_rooms_dialog.popup();
    };
    I am getting the error that "this.get_rooms_button_listener() is not a function".
    Where am I wrong?
    Thanks.

  2. #2
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Default

    From the code you quote the problem is probably :
    -You define "get_rooms_button_listener" after trying to call it.
    You must define the function before calling it.
    -You should define the function with "com_zimbra_om.prototype.get_rooms_button_listener " instead of "com_zimbra_om.get_rooms_button_listener"

Similar Threads

  1. Replies: 5
    Last Post: 05-11-2012, 03:16 PM
  2. [SOLVED] I broke my server trying to optimize... HELP!
    By myriad in forum Administrators
    Replies: 9
    Last Post: 09-17-2011, 07:46 AM
  3. Replies: 6
    Last Post: 03-14-2011, 05:21 AM
  4. [SOLVED] New zcs 7 install : database errors founds
    By dkbk in forum Administrators
    Replies: 4
    Last Post: 03-01-2011, 06:49 AM
  5. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 01:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •