2.1 KiB
Every help and PR extending abap2UI5 view class with additional properties is welcome!
If you create a view and you miss a specific property or event of an UI5 control, you can extend the class z2ui5_cl_xml_view. It is an ABAP copy of the UI5 API. Just extend the importing parameters of the method with the additional property by doing the following:
(1) Check the UI5 API for the UI5 Control you want to extend:
Go to the UI5 API and search for your UI5 Control. (for example "Input")
(2) Check the properties and events of the UI5 Control:
Scroll down to see the properties:
And events:
(3) Find the property or event you newly want to add: (for instance "showclearicon")
(4) Open the class z2ui5_cl_xml_view in eclipse and scroll to the method of the control:
(5) Add the name of the new property in the method definition:
(type is always "clike", optional, case is not relevant)
(6) Add the name of the new property in the method implementation:
(in this case it is a boolean, so wrap it into the helper method, normally no need for this)
(7) Contribute your change by opening a PR.
Thank you for your help!