on 11-03-2015 4:04 PM
HI
Ive this JSBin(thanks Dennis) and I need to create new aggregation controls with the following
JS Bin - Collaborative JavaScript Debugging
1.Title
2. The Radio button group have two buttons and when you click on the second its open for
you the listbox which is disabled ,
I need to do it with the this.setAggregation and i've lots of troubles...can someone help please?
I cannot use the sap.m lib ...
Miley
sorry, Miley
your code is kind of messy so I do not know what you are trying to do.
I have cleaned it up
JS Bin - Collaborative JavaScript Debugging
Maybe you can tell us why you want to setAggregation in onInit function.
The control is already passed in from the contructor .
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,
Lets take the title for example wIth the setAggeration I want to provide the text
as i18n as default within the new control and I want that the user will have the ability
to set it when he create the control and if he dont pass it it will take the i18n from the control itself
something like if the user want to pass to the control the title
var myList = new MyControl({
titleText: 'user text'
}),
and if dont
var myList = new MyControl();
this will put in the title the defualt i18n which is defined by the composite control... and the same for layoutData
2. and for the drop down box I want that the following code will be defined in the composite control
and user need to provide just the binding.. key& text , is it possible ?
items: {
path: '/list',
template: new sap.ui.core.ListItem({
text: '{key}',
key: '{key}'
})
}
Thanks a lot!
Miley
Thanks a lot Dennis,
For the default value this works ,
1. I need to provide the title also by default layoutData how it can be done?
layoutData: new sap.ui.layout.GridData({
span: "L12 M12 S12"
})
2. is it possible to define the following inside the control ? the new sap.ui.core.ListItem({
that the user will path the just the text & key path ...? becouse the list item is mandtory
and cannot be changed but the binding yes...
dropDownBoxItems: {
path: '/list',
template: new sap.ui.core.ListItem({
text: '{key}',
key: '{key}'
})
},
Thanks for you help!
Miley
HI Dennis,
1. I understand that I can add the layoutData as property but how can I assign it to the title?
2. I mean that I know that the template is mandatory for DDB template: new sap.ui.core.ListItem({
and I want to add it as part as my composite control that when you create the control you dont need to pass the template just the binding to text and key ...
Thanks!
Miley
third attempt 😞
Thank you Dennis!
Last question on this topic I need that the layout will behave like the title text, by default it will have
layoutData: new sap.ui.layout.GridData({
span: "L12 M12 S12"
})
and the user will have ability to change it if he provide it like in your example, is it possible ?
I ask it since this is not as text which you can provide default value like in your example.
I just want to say that I dont find examples except the wiki and Im working with Ui5 almost a month
and Its difficult to find examples to things which are not in the main stream...
For composite control I found just the following which doesnt answer my questions...
Best Regards,
Miley
final attempt 🙂
JS Bin - Collaborative JavaScript Debugging
I understand that it is hard to find example and tutorial on building controls. This is one of the most challenging tasks because we have to make sure that it works on all supported modern browsers. And it is not easy to write a tutorial for this.
Thanks
-D
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.