1 (function ($, rf) { 2 3 rf.ui = rf.ui || {}; 4 5 rf.ui.PopupList = function(id, listener, options) { 6 this.namespace = this.namespace || "." + rf.Event.createNamespace(this.name, id); 7 var mergedOptions = $.extend({}, defaultOptions, options); 8 $super.constructor.call(this, id, mergedOptions); 9 mergedOptions['selectListener']=listener; 10 this.list = new rf.ui.List(id, mergedOptions); 11 }; 12 13 rf.ui.Popup.extend(rf.ui.PopupList); 14 var $super = rf.ui.PopupList.$super; 15 16 var defaultOptions = { 17 attachToBody: true, 18 positionType: "DROPDOWN", 19 positionOffset: [0,0] 20 }; 21 22 $.extend(rf.ui.PopupList.prototype, ( function () { 23 24 return { 25 26 name : "popupList", 27 28 __getList: function() { 29 return this.list; 30 }, 31 32 destroy: function() { 33 this.list.destroy(); 34 this.list = null; 35 $super.destroy.call(this); 36 } 37 } 38 })()); 39 40 })(RichFaces.jQuery, window.RichFaces);