SAP UI5 StandardListItem和ObjectListItem的区别

StandardListItem的用法:

<mvc:View controllerName="sapcp.cf.tutorial.app.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m">
	<Shell id="shell">
		<App id="app">
			<pages>
				<Page id="page" title="{i18n>title}">
					<content>
						<List items="{/Products}">
							<StandardListItem type="Navigation" press="handleListItemPress" title="{ProductName}"/>
						</List>
					</content>
				</Page>
			</pages>
		</App>
	</Shell>
</mvc:View>

ObjectListItem的用法:

<mvc:View controllerName="sapcp.cf.tutorial.app.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m">
	<Shell id="shell">
		<App id="app">
			<pages>
				<Page id="page" title="{i18n>title}">
					<content>
						<List items="{/Products}">
							<ObjectListItem type="Navigation" press="handleListItemPress" title="{ProductName}" number="{= ((${UnitPrice} * 100) / 100).toFixed(2) }"
								numberUnit="{i18n>currency}">
								<attributes>
									<ObjectAttribute text="{QuantityPerUnit}"/>
								</attributes>
								<firstStatus>
									<ObjectStatus text="{= ${Discontinued}? 'Discontinued' : 'Available' }" state="{= ${Discontinued}? 'Error' : 'Success' }"/>
								</firstStatus>
							</ObjectListItem>
						</List>
					</content>
				</Page>
			</pages>
		</App>
	</Shell>
</mvc:View>

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

发布了6690 篇原创文章 · 获赞 641 · 访问量 110万+

猜你喜欢

转载自blog.csdn.net/i042416/article/details/104369908