diff --git a/packages/ui-form/src/controller/App.controller.ts b/packages/ui-form/src/controller/App.controller.ts index a721572..acbce37 100644 --- a/packages/ui-form/src/controller/App.controller.ts +++ b/packages/ui-form/src/controller/App.controller.ts @@ -8,7 +8,7 @@ export default class AppController extends Controller { public onInit() { // apply content density mode to root view - this.getView().addStyleClass((this.getOwnerComponent() as AppComponent).getContentDensityClass()); + this.getView().addStyleClass(this.getOwnerComponent().getContentDensityClass()); }; }; diff --git a/packages/ui-form/src/controller/Registration.controller.ts b/packages/ui-form/src/controller/Registration.controller.ts index f30fb8c..d6e4a85 100644 --- a/packages/ui-form/src/controller/Registration.controller.ts +++ b/packages/ui-form/src/controller/Registration.controller.ts @@ -46,7 +46,7 @@ export default class RegistrationController extends Controller { public onInit() { // keep the reference to the OData model - this.oDataModel = this.getOwnerComponent().getModel() as ODataModel; + this.oDataModel = this.getOwnerComponent().getModel(); // load previous data const oBinding = this.oDataModel.bindList("/Person"); @@ -62,7 +62,7 @@ export default class RegistrationController extends Controller { }); // store the reference to the i18n model - this.oBundle = (this.getOwnerComponent().getModel("i18n") as ResourceModel).getResourceBundle() as ResourceBundle; + this.oBundle = this.getOwnerComponent().getModel("i18n").getResourceBundle() as ResourceBundle; // listen to focusleave on the fields to validate the user input const aControls = Core.byFieldGroupId("RegForm"); @@ -77,7 +77,7 @@ export default class RegistrationController extends Controller { this.getView().addEventDelegate({ onAfterShow: () => { this.byId("firstName").focus(); - (this.byId("page") as Page).scrollTo(0); + this.byId("page").scrollTo(0); } }) @@ -141,7 +141,7 @@ export default class RegistrationController extends Controller { MessageToast.show(this.oBundle.getText("existingDraftLoaded"), {duration: 5000}); } - (this.byId("submitButton") as Button).setText(this.oBundle.getText("updateButtonText")); + this.byId