Dear community,
I have a problem with my Fiori like Master-Detail App.
In my Detail View I have a Table for Lintitems.
<Table
headerText="{i18n>LineItemTableHeader}"
items="{project_contracts/?$expand=contract,working_hour}" >
<columns>
....
<ColumnListItem
type="Navigation"
press="handleLineItemPress" >
<cells>
<ObjectIdentifier
title="{working_hour/LST_DATE}" />
<Text
text="{working_hour/DESCRIPTION}"/>
<Text
text="{contract/CONTRACT_NAME}"/>
<Text
text="{working_hour/RE_STUNDEN}"/>
<Text
text="{working_hour/CONSULTANT_ID}"/>
</cells>
</ColumnListItem>
If I remove ",working_hour" in binding it shows the contract Line perfectly and add three records to the table this is right.
But addiontially I want some working_hour information so I expand this table. But then the table is empty.
But if I use the url manually on odata server he gaves me the data.
... Pato.svc/project_contracts?$expand=contract,working_hour&$format=json
"results": [
{
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/project_contracts(PROJECT_CONTRACT_ID=1)", "type": "Pato.project_contract"
}, "contract": {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/contracts(CONTRACT_ID=1)", "type": "Pato.contract"
}, "customer": {
"__deferred": {
"uri": "contracts(CONTRACT_ID=1)/customer"
}
}, "project_contracts": {
"__deferred": {
"uri": "contracts(CONTRACT_ID=1)/project_contracts"
}
}, "CONTRACT_ID": 1, "CONTRACT_NAME": "DSG_MH", "CHARGE": 120, "BEGIN_DATE": "null", "END_DATE": "null", "CUSTOMER_ID": 1
}, "project": {
"__deferred": {
"uri": "project_contracts(PROJECT_CONTRACT_ID=1)/project"
}
}, "working_hour": {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/working_hours(ITEM_ID=1)", "type": "Pato.working_hour"
}, "project_contracts": {
"__deferred": {
"uri": "working_hours(ITEM_ID=1)/project_contracts"
}
}, "employee": {
"__deferred": {
"uri": "working_hours(ITEM_ID=1)/employee"
}
}, "ITEM_ID": 1, "LST_DATE": "\/Date(1468368000)\/", "DESCRIPTION": "DESCRIP", "TODO": "todo", "INVOICE": false, "RE_DATE": "null", "RE_STUNDEN": 8, "RE_TEXT": "text", "NOTICE": "notice", "COMMITTED": false, "CONSULTANT_ID": 1
}, "PROJECT_CONTRACT_ID": 1, "WBS_ELEM": 1, "CONTRACT_ID": 1, "ITEM_ID": 1
}, {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/project_contracts(PROJECT_CONTRACT_ID=2)", "type": "Pato.project_contract"
}, "contract": {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/contracts(CONTRACT_ID=1)", "type": "Pato.contract"
}, "customer": {
"__deferred": {
"uri": "contracts(CONTRACT_ID=1)/customer"
}
}, "project_contracts": {
"__deferred": {
"uri": "contracts(CONTRACT_ID=1)/project_contracts"
}
}, "CONTRACT_ID": 1, "CONTRACT_NAME": "DSG_MH", "CHARGE": 120, "BEGIN_DATE": "null", "END_DATE": "null", "CUSTOMER_ID": 1
}, "project": {
"__deferred": {
"uri": "project_contracts(PROJECT_CONTRACT_ID=2)/project"
}
}, "working_hour": {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/working_hours(ITEM_ID=2)", "type": "Pato.working_hour"
}, "project_contracts": {
"__deferred": {
"uri": "working_hours(ITEM_ID=2)/project_contracts"
}
}, "employee": {
"__deferred": {
"uri": "working_hours(ITEM_ID=2)/employee"
}
}, "ITEM_ID": 2, "LST_DATE": "\/Date(1468368000)\/", "DESCRIPTION": "DESCRIP", "TODO": "todo", "INVOICE": false, "RE_DATE": "null", "RE_STUNDEN": 8, "RE_TEXT": "text", "NOTICE": "notice", "COMMITTED": false, "CONSULTANT_ID": 1
}, "PROJECT_CONTRACT_ID": 2, "WBS_ELEM": 2, "CONTRACT_ID": 1, "ITEM_ID": 2
}, {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/project_contracts(PROJECT_CONTRACT_ID=3)", "type": "Pato.project_contract"
}, "contract": {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/contracts(CONTRACT_ID=2)", "type": "Pato.contract"
}, "customer": {
"__deferred": {
"uri": "contracts(CONTRACT_ID=2)/customer"
}
}, "project_contracts": {
"__deferred": {
"uri": "contracts(CONTRACT_ID=2)/project_contracts"
}
}, "CONTRACT_ID": 2, "CONTRACT_NAME": "DSG_MG", "CHARGE": 100, "BEGIN_DATE": "null", "END_DATE": "null", "CUSTOMER_ID": 1
}, "project": {
"__deferred": {
"uri": "project_contracts(PROJECT_CONTRACT_ID=3)/project"
}
}, "working_hour": {
"__metadata": {
"uri": "http://localhost:81/odata/Pato.svc/working_hours(ITEM_ID=3)", "type": "Pato.working_hour"
}, "project_contracts": {
"__deferred": {
"uri": "working_hours(ITEM_ID=3)/project_contracts"
}
}, "employee": {
"__deferred": {
"uri": "working_hours(ITEM_ID=3)/employee"
}
}, "ITEM_ID": 3, "LST_DATE": "\/Date(1468368000)\/", "DESCRIPTION": "DESCRIP", "TODO": "todo", "INVOICE": false, "RE_DATE": "null", "RE_STUNDEN": 8, "RE_TEXT": "text", "NOTICE": "notice", "COMMITTED": false, "CONSULTANT_ID": 1
}, "PROJECT_CONTRACT_ID": 3, "WBS_ELEM": 1, "CONTRACT_ID": 2, "ITEM_ID": 3
}
WBS_ELEM is the id of the current Master record.
So where is my mistake?
I do it on the same way with another table and similiar table structure.
Please help,
Marcel Gatermann