on 06-20-2014 8:22 AM
Hi there,
I'm using a sap.m.List and do aggregation binding using a factory function. I need to use a factory function as I create a custom control for the sap.m.List.
However, when getting all the entries for the data binding for my factory function, I need to skip some entries, for example when a status is not the right value.
When returning null in the factory function, the data binding fails.
TypeError: Cannot read property 'setBindingContext' of null
Is there a way to skip creation of a UI element for data binding when using a factory function?
Regards
Tobias
Tobias,
Can you post your code?
Regards,
RW
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks something like this:
new sap.m.List( {
items : {
path : "/some_data_entries",
factory : function( id, context ) {
var data_path = context.getPath();
var single_data = context.getProperty( data_path );
if( single_data.status != "20" ) {
return null;
}
After the return I will create a new CustomListItem, which works just fine.
Can't use use a filter to remove the unwanted items?
https://sapui5.hana.ondemand.com/sdk/#docs/guide/91f057786f4d1014b6dd926db0e91070.html
Many thanks,
Jason
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.