u8.Crm.Widgets.RecordSetView=function(e,t){this.Widget(e,t);$.extend(this,u8.Crm.Widgets.RecordSetView.defaults,t);if(typeof this.recordSet=="string"){this.recordSet=u8.services.recordSets.get(this.recordSet)}$assert(this.recordSet,"Failed to create a record set grid! Property 'recordSet' must be set!");this._create()};$.extend(u8.Crm.Widgets.RecordSetView.prototype,{_create:function(){var e=this.searchAndListName||this.infoAreaId;if(!e){var t=this.recordSet.getInfoAreaIds();e=t&&t.length&&t[0]}var r=new u8.Crm.Widgets.SearchView(this.element,{parent:this,name:e,header:{headerName:"ResultSetList"},resultModel:{dataProvider:{reader:{endPoint:"RecordIdListChannel"}}},showSearchForm:false,onCreate:this._onSearchViewCreate.bind(this)});r.execute()},_onSearchViewCreate:function(e,t){var r=this.recordSet.getRecordIds(e.model.infoAreaId);var d=e.resultModel.dataProvider.reader;d.arguments={recordIds:r}}});u8.Crm.Widgets.RecordSetView.makeClass({name:"RecordSetView",deriveFrom:u8.Base.Widgets.Widget});