on 12-15-2015 5:28 PM
HI,
I need to create custom control with aggregation of dropDownBox and label (the label should be on the left side of the drop down) which get as input (should be define as properties of the custom control ) array of values
like following array of object like following
var myValues = [
{name:"test",
name2:"test 23333"
},
{name:"test5555",
name2:"test 2fasdf"
}
...
}
my values should be sent to the custom control as parameter
when you open the screen the drop down should be enabled with selected value according to the binding but
I need that the drop down will display also the secondary value . i.e. you see name and name2 value with space inside the dropDown,
How it can be achieved in UI5 ?
Thanks,
Stephane
Sorry, I do not get your questions
Can you create your custom control with your best attempt and we can fix it later?
Thanks
-D
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 try the following which is doesnt work
I need it to get the following object as property entry and I need to display both value in the DDB
var myValues = [
{name:"test",
name2:"test 23333"
},
{name:"test5555",
name2:"test 2fasdf"
}
...
}
http://jsbin.com/dusuforidi/1/edit?css,js,output
Thanks,
Stephane
Sorry I sent you the wrong one,here is more appropriate one
which is related my problem
Thanks a lot Dennis!
How should I make it wider and provide also the secondery value for example
if this is the object I want it to display the first and second in the same line.
var myValues = [
{name:"first ",
name2:"second"
},
{name:"aaaaa",
name2:"bbbbbb"
}
];
and in addtion lets say that the second object is bounded how you recomend to have the binding in this case?
Regards,
Stephane
HI Dennis,
Thanks you very much you are awesome!
Just few little things ( my last question on this )
1. Just The binding and how you suggest to do that ? bind value that when I open the screen
I will see the binded value selected
2.How you can make it wider ?
3. Assume I need to add label in the left side of the DDB how you would do it ?
(I ask it since I want to know how its the right way to do it with renderer ...)
Best Regards,
Stephane
1. Bind when the view is created
2. make what wider?
3. http://jsbin.com/qehuquc/edit?css,js,output
thanks
-D
Hi Dennis,
1. I mean lets say that in my model i've field which is called ddbvalue and I want that the selected item will be bindeded to it how whould you do that ?
2. I mean the drop down box change the width of it to 400px for example
(I ask it since here we are dealing with renderer ...)
Thanks Again
Stephane
HI Dennis,
This solve the issue but raise onother when I want to do like following
var oDropDown = new DropdownBox({
enabled: true,
busy: false,
change: this._onDropdownBoxChange.bind(this),
selectedKey: '{/selected}'
});
self.addAggregation("_dropdownList", oDropDown);
When I do that I got error with the binding cardinality so I put the following in the
var ddl = oControl.getAggregation('_dropdownList');
if (ddl) {
ddl.destroy();
delete ddl;
}
ddl = new sap.m.VBox();
oControl.setAggregation('_dropdownList', ddl);
oControl.getMyData().forEach(function(x) {
ddl.addItem(new sap.ui.core.ListItem({
key: x.name,
text: x.name2 + ' (' + x.name + ')'
}));
})
in onBeforeRendering so my question is how to use the select event .
Thanks a lot
Stephane
User | Count |
---|---|
85 | |
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.