[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Managing Data Without a Grid

  • Thread starter Thread starter jts-law
  • Start date Start date
Status
Not open for further replies.
J

jts-law

Guest
Greg, I'm pretty sure the way I'm doing this may not be the recommended way, but it works. Hopefully this is everything (I'm skipping a bunch of custom logic not related to the popup). I put the following in my topSection.html: OK The following is in my constructor (controller.public.js): this.$components['ddScenario'] = { widget: null, options: { dataSource: this.$ds['dsScenario'], dataTextField: "name", dataValueField: "sid", optionLabel: "", valuePrimitive: false }, events: { onChange: (e) => { }, onSelect: (e) => { } }, validation: { required: false } }; # Can't figure another way to hook things to my custom html objects let topScope = scope; do { if (topScope.$parent !== null) { topScope = topScope.$parent; } } while(topScope.$parent !== null); topScope.okOpenScenario = () => { this.setCurrentScenario(); } Additional methods: // Call this method from a button/link to open popup dialog openPopupOpenScenario() { let winOpenScenario = angular.element("#popupOpenScenario").data("kendoWindow"); this.winOpenScenarioOptions = { width: 600, visible: false, resizable: false, title: "Open Scenario", modal: true, actions: ["Close"] }; winOpenScenario.setOptions(this.winOpenScenarioOptions); winOpenScenario.center(); winOpenScenario.open(); } // openPopupOpenScenario setCurrentScenario(e) { // Close/hide popup window let popupOpenScenario = angular.element("#popupOpenScenario").data("kendoWindow"); popupOpenScenario.close(); // Remaining logic to run when Ok button clicked } If anyone knows of a better way to expose/link methods/data to custom html other than traversing up to the top level scope, please let me know as I really hate doing this but haven't figured out a better way yet. Louis

Continue reading...
 
Status
Not open for further replies.
Back
Top