Skip to Content
0

Missing Bindings in SAPUI5

Dec 11, 2016 at 07:04 PM

20

avatar image
Former Member

Hi experts,

hope somebody can help :-)

I have created an oData-Service which gives me an entitySet. The Metadata looks like this:

Now i have a XML-View like this:

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
    xmlns="sap.m" controllerName="kkl.controller.Overview" xmlns:html="http://www.w3.org/1999/xhtml">
    <Page id="oPage" title="{i18n>title}" navButtonPress="onNavBack">
        <Table id="buttTable" visible="false" items="{
                path: '/MenueSet'
                    }"
            width="auto">
            <columns>
                <Column width="100%"></Column>
            </columns>
            <items>
                <ColumnListItem>
                    <cells>
                        <Button text="{Bezeichnung}" width="100%"></Button>
                    </cells>
                </ColumnListItem>
            </items>
        </Table>
        <TileContainer id="tileCont" visible="false" tiles="{/MenueSet}">
            <tiles>
                <StandardTile title="{Bezeichnung}"></StandardTile>
            </tiles>
        </TileContainer>
    </Page>
</core:View>

My next step is on the Controller to load the data:

// Jetzt das Menü holen
            var menu = this._model.getProperty("/menu");
            this._mModel = this.getView().getModel("benutzer");
            this._mModel.read("/MenueSet?$filter=Mmenu eq '" + menu + "'",
            false);
        //Kacheln oder Buttons anzeigen?
            this._mKachel = this._model.getProperty("/kachel");
            if (this._mKachel == 'X') {
                this.ShowTiles();
            } else
            this.ShowTab();
       },
       
       ShowTab: function(){
          var table =  this.getView().byId("buttTable");
          table.setVisible(true);
          table.setModel(this._mModel);
       },
       
       ShowTiles: function() {
         var tCont =  this.getView().byId("tileCont");
         tCont.setVisible(true);
         tCont.setModel(this._mModel);
       },

When I try to execute the oData-Service I get a result:

But my result in chrome looks like this:

As you can see only the title of the last entry is filled in the tiles, also the system recognized that there are three entries.

I am a little bit confused. An ysuggestions what i did wrong?

Thanks a lot,

Mathias

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers