on 09-29-2015 8:44 AM
Hi,
I've create new UI Control via extend command and I want to use it in the SAP WebIDE (which is nice tool) from diffent plugins and files.
Since I new to this topics (create new UI5 control and using the WebIDE) I need is a step by step guide in order to expose it?
I think I should use Define/ Declare and maybe use the re-use library but not sure how to do it right and I didnt find any helpful documents about this topic...
Regards,
Stephane
use jQuery.sap.require in case controle is within your project.
if it is in a different project use
jQuery.sap.registerModulePath
first to declare a mapping to external resourcs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Stephane
Depending on how you structure your code
'use strict';
jQuery.sap.declare('your.company.controls.Sample');
sap.ui.core.Control.extend('your.company.controls.Sample', {
renderer : function(oRm, oControl) {
oRm.write('<div');
oRm.writeControlData(oControl);
oRm.writeStyles();
oRm.write('>sample');
oRm.write('</div>');
}
});
-D
Hi Stephane,
This link will help you to develop new UI5 controls.
https://www.nabisoft.com/tutorials/sapui5/creating-custom-controls-in-sapui5
Before going to this topic, you should know about JS classes and HTML5 basics.
Thanks,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.