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.
Hi,
The idea here is to extend the control, so indeed add a new property that does NOT exist yet.
So we are creating a new allowHover property on the Button. The purpose is to be able to change that property from true to false, and write code that triggers the hover event if the property is set to true.
When you create a new property, a get method is automatically added also. That's why you use the following code in the onmouseover event : if(this.getAllowHover()) {...}
If you want to change the name of the property you also need to change the name of the function, so for example if you name the property xxallowHover then you have to use the function getXxallowHover().
Hope that helps.
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.