Skip to Content
0

Cannot using mvc:XMLView in dialog SAPUI5

May 03 at 04:39 AM

28

avatar image

Hello expert,

I have 2 xml file, i need to call from xml to another xml via dialog, but i occurs the problem:

Error: resource CommentAdd/CommentAddFrame.view.xml could not be loaded from /sapui5/resources/CommentAdd/CommentAddFrame.view.xml. Check for 'file not found' or parse errors. Reason: Not Found -

With file1.xml:

<mvc:View controllerName="Comment.Comment"
		xmlns="sap.m"
		xmlns:l="sap.ui.layout"
		xmlns:mvc="sap.ui.core.mvc"
		xmlns:u="sap.ui.unified"
		xmlns:t="sap.ui.table"
	           xmlns:form="sap.ui.layout.form"
		height="100%"
	          width= "100%"
	          xmlns:html="http://www.w3.org/1999/xhtml"
		xmlns:core="sap.ui.core" >
     <html:div>
		 <html:div  id ="Buttons" class="centerDiv buttonAdd " >
			<Button press="OpenAddCommentWindow" name="AddButton" enabled="false" id="AddButton"
					text="Save" class="commonClass "  />
	         	
		 </html:div>		 
  		    <Dialog escapeHandler=".onEscapePress" title="Press ESC" id="xmlviewDialog">
			<mvc:XMLView viewName="CommentAdd.CommentAddFrame" id="xml_sample_1" async="true"></mvc:XMLView>
		</Dialog>
    </html:div>  
</mvc:View>

please help me to advise.

Thank you

Cuong

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

1 Answer

Best Answer
VIPLOVE KHUSHALANI May 03 at 06:05 AM
0

Hey ..

Might be the path of the view is incorrect because if you check error compiler is finding the view in the default resource folder which is not the place where it is .. Check out how we mention view path in viewName property below .. Otherwise can you share your project structure along with highlighting the view you need nest into another view.

<mvc:XMLView viewName="<namespace>.<folder_containing_view>.<viewName>"/>
Share
10 |10000 characters needed characters left characters exceeded