-
Notifications
You must be signed in to change notification settings - Fork 1
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
Extend bindings modeling #69
Conversation
81f32d0
to
b189414
Compare
return Controller.extend("foo", { | ||
onInit: function() { | ||
// Early property binding | ||
var oInputWithEarlyPropertyBinding = new sap.m.Input({ |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
|
||
// Early dynamic property binding | ||
const model = "model"; | ||
var oInputWithEarlyDynamicPropertyBinding = new sap.m.Input({ |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
oInput.bindProperty("value", "name"); | ||
|
||
// Early composite binding | ||
var oInputWithEarlyContextBinding = new sap.m.Input({ |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
}); | ||
|
||
// Early property metadata binding | ||
var oLabel = new sap.m.Label({ |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
2b85ea8
to
d7c5cfb
Compare
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another fantastic huge improvement and I learned a lot reading through this PR. Added more docstrings for documentation and to check if we are on the same page.
We substitute the value with the object because that combined with the key represents which property of the object gets bounded. The object represents a better binding target since we don't represents Json object members and the value is the binding itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one additional comment
javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll
Show resolved
Hide resolved
One more addition please: Since views can be declared in JS code as well (example), can you cover this as well? Maybe like: private newtype TBindingTarget =
...
} or
TJsonPropertyBindingTarget(JsonObject target, string key, Binding binding) {
binding = TJsonPropertyBinding(target, key, _)
} or
TJsViewBindingTarget(/* TBD */) {
/* TBD */
} |
No need to do this now; works great on my branch. TY! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid LGTM
This extends the number of supported bindings and introduces a binding parser to deal with binding strings.