on 09-21-2015 12:02 PM
Hi,
I found this example and I need to use something with similar logic but I need to create New Ui5 control
which encapsulate all the logic inside
JS Bin - Collaborative JavaScript Debugging
I need to add the following functionality to the new control plus what is defined in the JS bin,I wasnt able to sucessed with it since we have to provide additional logic
1.Add value functionality like following:
value: {
path: "/path",
mode: sap.ui.model.BindingMode.OneWay,
formatter: function(path) {
var event = this;
doc.getProject().then(function(oProject) {
....
}
},
2. Add the suggest and change method
suggest: function(oEvent) {
this.destroyItems();
var sValue = oEvent.getParameter("suggestValue");
for (var i = 0; i < aData.length; i++) {
...
}
}
},
change: $.proxy(oController.onChange, oController),
3. add the following
oAuto1.setFilterFunction(function(sValue, oItem) {
var ignVal = sVae.trCase();
return (oItem.getText() !== -1) ||
.....
});
Is this possible in UI5 ?
Regards,
Joerg
HI Again,
I know that this is not trivial and can be complicated but can I get some help in this?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Dennis,
I've created UI5 control and in this control I've provided logic which is not handled by "original" control,
therefore I want provide it as new control to other users. so instead users need the same functionality will need to copy paste this code I'll provide new control which handle all the needed functionality...
Does it make sense now
Hi Dennis,
the getProj its doesnt matter therefore I put the 3 dots (this can return Boolean for example) I want just to understand how to structure all this method in new UI5 control...in render metadata rerender etc,sorry to say but the documatation is very basic and you dont find much example for this topic in the web...and I want to know how to do it right.
Thanks
Joerg
HI Dennis,
Thanks for support I appreciate it!
the auto complete have suggestion function in case I want to implement it how I do it in new control?
need just pseudo ...
Hi Joerg
I got this from the web
var oAuto3 = new sap.ui.commons.AutoComplete({
tooltip: "Enter a name",
maxPopupItems: 5,
suggest: function(oEvent){
var sValue = oEvent.getParameter("suggestValue");
for(var i=0; i<aData.length; i++){
if(jQuery.inArray(aData[i].userid, aAlreadyAddedUsers) < 0 && jQuery.sap.startsWithIgnoreCase(aData[i].name, sValue)){
oAuto3.addItem(new sap.ui.core.ListItem({text: aData[i].name}));
aAlreadyAddedUsers.push(aData[i].userid);
}
}
}
});
pretty straightfoward
Please let us know if you need more help
Thanks
-D
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.