Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 398359

Summary: [MenuBar] Adding menu listener leads to JavaScript error
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: tbuschto
Version: 2.0   
Target Milestone: 2.0 RC2   
Hardware: All   
OS: All   
Whiteboard:

Description Ivan Furnadjiev CLA 2013-01-17 03:45:26 EST
Reproducible with Controls Demo -> Shell tab by adding menu listener to the MenuBar:
..................
Error: Error: Operation "listen" on target "w144" of type "rwt.widgets.MenuBar" failed:
targetObject[setterName] is not a function
Properties: 
Show = true
Hide = true
Comment 1 Tim Buschtoens CLA 2013-01-17 04:25:56 EST
Menu listener on menu bar was (and still is) not supported. Previously MenuAdapter.js looked like this:

    "menu" : function( widget, value ) {
      if( !widget.hasState( "rwt_BAR" ) ) {
        widget.setHasMenuListener( value );
      }
    },

This somwhow broke a few months ago when we changed the listener names.
We could fix it server-side (don't render listen) or client-side (ignore listen).
Comment 2 Ivan Furnadjiev CLA 2013-01-17 05:12:16 EST
Fixed with commit 2271c67823d1ef7ec9b2988bcee86a44acb3a9dd.