2024 Oct 28 3:52 PM - edited 2024 Oct 28 3:55 PM
Hello,
there is a learning journey develop-sapui5-applications
In a following part, --> Working with UI5-Controls --> Developing a Standard Control Extension , there are tasks.
I have a question about the task 1 "Extend the Button Control".
For this task 1, we create a control file HoverButton.js. We add a property "allowHover".
I tried to find this property in the documentation (ui5.sap.com). But i don't find it anywhere.
Where can I find the definition of that property ?
PS :
If you want to do the exercise, you can start from here : Developing a Full-screen Application
Or the solution can be found here
Request clarification before answering.
Hello,
I did the following test :
- change the name of the property from "allowHover" to "zzallowHover" in 2 files (HoverButton.js and Flights.view.xml)
- after the change, I tested the "mouseover". And the "mouseover" was no more working anymore:
the call of this.getAllowHover() triggers an error : "Uncaught TypeError: this.getAllowHover is not a function"
==> I falsely concluded that the name of the property was not free to choose and it was imposed by the framework.
I just now debogued the app and I just saw that the framework generates a get method for each property with the first letter in upper case :
property allowHover ==> method getAllowHover
property zzallowHover ==> method ZzallowHover
It is the point that I was ignoring and missing. If you change the name of the property then you have to change the name of the get method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.