on 05-15-2017 4:51 AM
_showObject: function(oItem) {<br> this.getRouter().navTo("invlineitem", {<br> invRefID: oItem.getBindingContext().getProperty("invoiceReferenceID")<br> });<br>
This is all there to it, My manifest.json has reference to invRefID, I am always getting a type error. Can you please point me to any working example with Json data to resolve the above issue.
The scenario is: Select the line item, click on the button to navigate to line item details page.
I am getting value for oItem. But getting the same error as uncaught type error getProperty() of undefined.
view code:
<mvc:View controllerName="sapui5.demo.mvcapp.controller.Master"
xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m">
<Page title="Supplier Overview">
<content>
<Table class="sapUiResponsiveMargin" width="auto" items="{detail>/Suppliers}">
<headerToolbar>
<Toolbar>
<Title text="Number of Suppliers: {detail>/CountSuppliers}"/>
</Toolbar>
</headerToolbar>
<columns>
<Column>
<header>
<Text text="ID"/></header>
</Column>
<Column>
<header>
<Text text="Name"/></header>
</Column>
</columns>
<items>
<ColumnListItem type="Navigation" press="onListPress">
<cells>
<ObjectIdentifier text="{detail>ID}"/>
<ObjectIdentifier text="{detail>Name}"/>
</cells>
</ColumnListItem>
</items>
</Table>
</content>
</Page>
</mvc:View>
controller code:
onListPress : function(oEvent) {
var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
var oItem = oEvent.getSource();
oRouter.navTo("detail", {
ID: oItem.getBindingContext().getProperty("ID")
});
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
I think you can solve as following.
As you configured items={detail>/CountSuppliers}
then, you shoud probably config items like as e.g. detail>/CountSuppliers>field1
/CountSuppliers here is a top level entity.
Or you can try items={detail>/} as / is a top level with no need for a top level entity.
So in items you can fillup as you're already filling.
<ObjectIdentifier text="{detail>ID}"/>
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.