Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8712

Re: Query regarding core:view and mvc:view in XML view

$
0
0

The query is answered in STACK OVERFLOW.

 

Link: SAPUI5:: Difference between core:view and mvc:view - Stack Overflow

 

answer:

 

The View control is in sap.ui.core.mvc: see Class sap.ui.core.mvc.View in the API docu. Therefore, the namespace for a View element in an XML view definition is sap.ui.core.mvc.

This usually translates to something like:

<mvc:View xmlns:mvc="sap.ui.core.mvc" ... 

but of course the prefix is arbitrary and you could just as well have:

<banana:View xmlns:banana="sap.ui.core.mvc" ... 

The point is that it's the namespace that's important, at least technically. The confusion probably arises because the XML processor is rather lenient on the namespace specified for the root View element.

So to answer your question specifically, while core:View might be "correct" if you crazily specified xmlns:core="sap.ui.core.mvc", it would be very confusing, so the best way to express it is

<mvc:View xmlns:mvc="sap.ui.core.mvc" ...

Viewing all articles
Browse latest Browse all 8712

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>