cancel
Showing results for 
Search instead for 
Did you mean: 

Extend ui5 control with method interface

former_member643798
Participant
0 Kudos

HI

I need to extend SAPUI5 control and I've the following example (Thanks to Dennis!),Currently there is extend for

Autocomplete which is working fine but now I need that that the new control will also have the ability to extend method which he getting from some additional interface control(lets say I've one interface control with method's and I need that all my controls will extend it like the control in the example)

e.g. to return if isRoot is true or false ,How it can be done via UI5 ?

JS Bin - Collaborative JavaScript Debugging

p.s. I found this getInterface() there is a way to use that this can help?

JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.base.Object

Thanks in advance:)

Joerg

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member643798
Participant
0 Kudos

Hi Experts,

Is it possible via some kind of trick?

Best Regards,

Joerg B

former_member182862
Active Contributor
0 Kudos

Disclaimer: I am not an expert

Hi Joerg

you can do this

JS Bin - Collaborative JavaScript Debugging

former_member643798
Participant
0 Kudos

HI Dennis,

In your example you put it on the prototype so every UI5 control have it this is not exactly what I refer to.

I need that as the following bin the method control itself do the implementation (AC control)

and I dont need that all the UI5 controls have it just  couple of my controls ,like an interface which some controls should implement ...there is a trick in UI5 that can achieve some of this behavior ?

Thanks a lot!

Joerg

JS Bin - Collaborative JavaScript Debugging

former_member182862
Active Contributor
0 Kudos

Sorry I have no ideas.

-D

former_member643798
Participant
0 Kudos

HI Dennis,

Thanks again for your replay

You answer is based that you understand the requirement ? I ask it since maybe I didn't explain my self well...

I need to provide method/s to several controls (new UI5 controls)  that they should implement (like interface mechanism is java, c++ etc )

Do you think that this can be achieved in some way in JS via UI5 ?

Best Regards and Thanks for your time!!!

Joerg