Xml 如何加上「;sap.suite.ui.commons.statusindicator.statusindicator;传呼?

Xml 如何加上「;sap.suite.ui.commons.statusindicator.statusindicator;传呼?,xml,sapui5,Xml,Sapui5,我想做的是在我的页面上添加一个状态指示器。当我运行应用程序时,我在控制台上没有收到任何错误,但状态指示器没有出现在我的页面上 这是我页面的xml代码 <core:View xmlns:core = "sap.ui.core" xmlns:mvc = "sap.ui.core.mvc" xmlns = "sap.m" xmlns:f = "sap.suite.ui.commons.statusindicator" controllerName = "EarthMonitoring.contr

我想做的是在我的页面上添加一个状态指示器。当我运行应用程序时,我在控制台上没有收到任何错误,但状态指示器没有出现在我的页面上

这是我页面的xml代码

<core:View xmlns:core = "sap.ui.core" xmlns:mvc = "sap.ui.core.mvc" xmlns = "sap.m" xmlns:f = "sap.suite.ui.commons.statusindicator" controllerName = "EarthMonitoring.controller.DetailPage" xmlns:html = "http://www.w3.org/1999/xhtml">
        <Page showHeader="false">
            <content>
                <f:StatusIndicator id="statusIndicator2" width="300px" height="300px" value="90"/>
            </content>
        </Page>
</core:View>

这是对结果的捕获,

我认为这是因为您没有指定
形状组
属性reshold

看看这个例子。希望这有帮助

<mvc:View xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="tableSelect.controller.Main"
displayBlock="true" xmlns:si="sap.suite.ui.commons.statusindicator">
<App>
    <pages>
        <Page title="test">
            <content>
                <si:StatusIndicator id="idIndicator" value="40">
                    <si:ShapeGroup>
                        <si:Rectangle x="0" y="0" width="50" height="100" strokeWidth="1" fillingType="Linear"/>
                    </si:ShapeGroup>
                    <si:propertyThresholds>
                        <si:PropertyThreshold fillColor="Critical" toValue="60"/>
                        <si:PropertyThreshold fillColor="Error" toValue="30"/>
                        <si:PropertyThreshold fillColor="Good" toValue="100"/>
                    </si:propertyThresholds>
                </si:StatusIndicator>
            </content>
        </Page>
    </pages>
</App>


我认为这是因为您没有指定
形状组
属性reshold

看看这个例子。希望这有帮助

<mvc:View xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="tableSelect.controller.Main"
displayBlock="true" xmlns:si="sap.suite.ui.commons.statusindicator">
<App>
    <pages>
        <Page title="test">
            <content>
                <si:StatusIndicator id="idIndicator" value="40">
                    <si:ShapeGroup>
                        <si:Rectangle x="0" y="0" width="50" height="100" strokeWidth="1" fillingType="Linear"/>
                    </si:ShapeGroup>
                    <si:propertyThresholds>
                        <si:PropertyThreshold fillColor="Critical" toValue="60"/>
                        <si:PropertyThreshold fillColor="Error" toValue="30"/>
                        <si:PropertyThreshold fillColor="Good" toValue="100"/>
                    </si:propertyThresholds>
                </si:StatusIndicator>
            </content>
        </Page>
    </pages>
</App>


答案解决了你的问题吗?答案解决了你的问题吗?谢谢你的回答,我不知道我们是否要在视图中添加一些状态指示器,我们应该初始化shapegroup和propertyThreshold。谢谢你的回答,我不知道我们是否要在视图中添加一些状态指示器,我们应该初始化shapegroup和propertyThreshold。