Skip to Content
Jan 18, 2018 at 04:17 PM

create custom control by using existing sapui5 control

118 Views Last edit Jan 18, 2018 at 04:18 PM 2 rev

Hi All,

I would like to create a custom control in sapui5 by using existing control.

For example instead of writing this in my view:

                    <Button icon="sap-icon://nav-back" press="onNavBack"></Button>
                    <OverflowToolbar id="otb2">
                        <Input liveChange="onSearchInBoard" placeholder="Search...">
                                <OverflowToolbarLayoutData minWidth="400px" shrinkable="false" priority="NeverOverflow" />

I would like to write something like :

<custom:Bar contentLeftButtonPress="onNavBack" contentLeftInputLiveChange="onSearchInBoard" ></custom:Bar>

Can we write the code in an xml document and call it from my custom declaration of my control? Or how to ?
Thanks and regards