-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assigning Values in XML View Bypasses Validation of Certain Types #2166
Comments
Hi @boghyon, |
Hi Irina, I just wanted to clarify that this isn't just about |
Hi,
Yes, sure, thank you. I ‘ ll add it to the internal message.
Best regards,
Irina
From: Boghyon Hoffmann <notifications@github.com>
Reply-To: SAP/openui5 <reply@reply.github.com>
Date: Monday, 20. August 2018 at 10:00
To: SAP/openui5 <openui5@noreply.github.com>
Cc: Irina Goetzenberger <irina.goetzenberger@sap.com>, Comment <comment@noreply.github.com>
Subject: Re: [SAP/openui5] Assigning Values in XML View Bypasses Validation of Certain Types (#2166)
Hi Irina, I just wanted to clarify that this isn't just about sap.m.Button. As far as I could see, this issue applies to all Controls in declarative views. The Button was just as an example.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#2166 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJOclRKfn4JdseQOF4HJu8j-PUdpDNkYks5uSmyvgaJpZM4WAE5V>.
|
It seems that with 1.28, there was an error in this case, but in any newer version it is gone: https://jsbin.com/penaziw/1/edit?html,js,output |
Hi @boghyon, we looked at this issue and the root cause is a refactoring on the sap/ui/base/DataType implementation (roughly 3 and a half years ago...). We will discuss how we can enhance the current behavior in a compatible way. BR, |
Sounds good. As long as there is some type of notification for the developer that a wrong type was used.. If applicable, I think an additional support rule checking whether the right type was used or not would be also beneficial. |
PS: |
@Thodd Sorry, I think the issue is not completely resolved. It works for enum types but for other types such as In https://jsbin.com/cevevaq/edit?html,js,console,output, we can see that only the error log for the Button |
@boghyon : as discussed, we will have another look at this. I assigned @devtomtom. |
Internal incident: DINC0395987 |
URL (minimal example if possible)
https://jsbin.com/cevevaq/edit?js,output
Steps to reproduce the problem
<Button>
(just as an example).type
-property is not a value fromsap.m.ButtonType
.What is the expected result?
The following error should be thrown:
What happens instead?
No error thrown. This might lead one thinking that the assigned (enum) value is correctly applied which is not immediately noticeable in some cases.
Any other information? (attach screenshot if possible)
I believe this issue applies to other declarative view types as well, not only XML.
width
throws the error expectedly in XML views.The text was updated successfully, but these errors were encountered: