SAP-docs / sapui5

This is the markdown version of the official SAPUI5 documentation from the SAPUI5 Demo Kit for external contributions.
Creative Commons Attribution 4.0 International
79 stars 126 forks source link

Controller Code for Sample Input Checked does not work #37

Closed sebastianesch closed 1 year ago

sebastianesch commented 1 year ago

Hi,

the sample for Input - Checked (https://ui5.sap.com/#/entity/sap.m.Input/sample/sap.m.sample.InputChecked) does not work.

In the Controller code https://ui5.sap.com/#/entity/sap.m.Input/sample/sap.m.sample.InputChecked/code/C.controller.js the function _validateInput needs to be corrected from:

_validateInput: function (oInput) {
    var sValueState = "None";
    var bValidationError = false;
    var oBinding = oInput.getBinding("value");

    try {
        oBinding.getType().validateValue(oInput.getValue());
    } catch (oException) {
        sValueState = "Error";
        bValidationError = true;
    }

    oInput.setValueState(sValueState);

    return bValidationError;
},

to:

_validateInput: function (oInput) {
    var sValueState = "None";
    var bValidationError = false;
    var oBindingInfo = oInput.getBindingInfo("value");

    try {
        oBindingInfo.type.validateValue(oInput.getValue());
    } catch (oException) {
        sValueState = "Error";
        bValidationError = true;
    }

    oInput.setValueState(sValueState);

    return bValidationError;
},

Kind regards, Sebastian

KvM2 commented 1 year ago

Hi @sebastianesch, thanks for your contribution. We appreciate it and will look into this.

simonarangelova commented 1 year ago

Hello,

After discussing this with the team, I have moved the issue to the OpenUI5 repository, as it is not related to documentation.

Thank you

boghyon commented 1 year ago

@sebastianesch Let's continue at https://github.com/SAP/openui5/issues/3693

sap-doc-bot[bot] commented 9 months ago

Thank you for your valuable feedback contribution, @sebastianesch! So that we can recognize your contribution in SAP Community, please tell us your SAP Community profile URL in a reply to this comment; don't include any other text, just the URL on its own, like this:

https://people.sap.com/your-user-name

Thanks!