0
我在我的視圖中使用了一個組件,以便可以設置佔位符div。SAPUI5查看只刷新刷新,如何重新初始化視圖內容?
<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:html="http://www.w3.org/1999/xhtml"
controllerName="CompleteSurvey.controller.CompleteSurvey">
<App>
<pages>
<Page title="{view>/surveyInfo/Name}">
<content>
<Text class="sapUiSmallMargin" text="{view>/siteInfo/SearchString}" id="__title0" width="auto" textAlign="Center"/>
<core:HTML content="<div id="panelContent"><div>"></core:HTML>
</content>
</Page>
</pages>
</App>
我然後創建控制器compenents,並將其放置在「panelContent」在
var oPanel = new sap.m.Panel({
expandable: true,
expanded: false,
headerText:oData.results[0].CategoryDesc
id: "Panel" + oViewData.surveyInfo.SurveyId + index
});
oPanel.placeAt("panelContent");
做工精細第一次,或者如果我刷新頁面。
但是,如果我只需點擊返回鍵,再進去,可惜「panelContent」內的內容不被清除,除了我原來的一個創建另一個面板。
請指教....
感謝日的建議,我會處理這個不同僅僅使用意見...打的問題已經雖然... https://stackoverflow.com/questions/46879029/sapui5-views-accessing-model-item - 用於面板的報頭 –