Skip to Content
author's profile photo Former Member
Former Member

SAPUI5 Message Manager

Hi,

I am trying out the SAPUI5 messsage manager and based on the documentation by SAP, Step 11: Validation Using the Message Manager, I can simply just create a control and register that object with the message manager and supposedly it will render an error message for that control if there is some validation or parse error.

I tested it out and yes, the error is captured by the message manager, but no error message or label is render for the control when I focus out of the control or press enter.

Anything else did I miss out?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Oct 14, 2015 at 04:42 AM

    Beck,


    I would see that you have to add sap.ui.getCore().attachValidationError(function(oEvent){}) manually for changing the value state.

    Please check the sample here, try to enter more than five characters in the text field: JS Bin - Collaborative JavaScript Debugging


    Regards,

    Sai Vellanki.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 14, 2015 at 03:15 AM

    Hi Beck,

    Did you mention the message in valueStateText property? Just for a reference, check this example from explored: SAPUI5 Explored

    Regards,

    Sai Vellanki.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2015 at 09:55 AM

    Well, that point was bothering me, so I looked into it, and here we are.

    As of today, it seems that the version of sap-ui-core.js is different whether you load it from your SAP HCP environment (using "../resources/sap-ui-core.js") or loading it from https://openui5.hana.ondemand.com/resources/sap-ui-core.js.

    The version "embedded" in the SAP HCP environment works as intended in the tutorial, but if you download the code as a zip from the Explored app, then sap-ui-core.js is loaded from https://openui5.hana.ondemand.com, which seems to be not OK.

    I might be wrong about this, and I would gladly stand corrected, but I am afraid that the version from openui5.hana.ondemand.com is newer than the one embedded in SAP HCP, thus possibly introducing a regression if this version is deployed in productive use.

    edit: I checked this morning the version in the js files:

    - https://openui5.hana.ondemand.com/resources/sap-ui-core.js, is in version 1.32.5 (buildtime: "20151102-1510"),

    - https://sapui5.hana.ondemand.com/resources/sap-ui-core.js and ../resources/sap-ui-core.js, are the same, version 1.30.9 (buildtime: "20151005-1141").

    SAPWebIDE let us use sap-ui-core.js version 1.32.4, which is buggy in regards of this tutorial...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2015 at 06:53 AM

    It seems the sap.m.Input Control support receiving validation messages and the sap.ui.commons.TextField doesn´t support it.

    Please check my example: JS Bin - Collaborative JavaScript Debugging

    Best regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.