如何读取 Tile Container SAP UI5 中的所有磁贴 [英] How to read all the tiles in the Tile Container SAP UI5

查看:43
本文介绍了如何读取 Tile Container SAP UI5 中的所有磁贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<core:FragmentDefinition xmlns="sap.m"xmlns:f="sap.ui.layout.form" xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
    xmlns:html="http://www.w3.org/1999/xhtml" xmlns:l="sap.ui.layout">
 <Page id="tileInfo" showHeader="false" enableScrolling="true" > 
    <TileContainer    
      id="getTiles"

      tiles="{myModel1>TILECOLLECTION}">    
      <StandardTile 
        icon="{myModel1>icon}"  
        number="{myModel1>number}"  
        info="{myModel1>info}"
        infoState="{myModel1>infostate}" 
        title="{myModel1>title}" 
        numberUnit="{myModel1>numberunit}"
        press="handleTilePress"
        class="myGreen"    
        />   
        </TileContainer>   
       </Page> 
</core:FragmentDefinition>

我想读取视图控制器中 TileContainer 中的每个图块.可能吗?

I want to read each tile in the TileContainer in the view controller. Is it possible ?

推荐答案

在控制器中:

...
var oTileContainer = this.byId("getTiles");
var aTiles = oTileContainer.getTiles();
...

数组中的aTiles是tile容器的tile聚合的tile.

in the array aTiles are the tiles of the tiles aggregation of the tile container.

这篇关于如何读取 Tile Container SAP UI5 中的所有磁贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆