I am trying to put XML view which contains page as the content, and placing that inside the popover, xmlviewXML view I am using is like this,
<mvc:View controllerName="controllerPath"
xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
xmlns:core="sap.ui.core" height="100%" width="100%">
<Page height="100%"
width="100%">
<content>
//some content...
</content>
</Page>
</mvc:View>
And I am creating popover like this inside the fragment,
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core">
<Popover
title="{Name}"
class="sapUiContentPadding"
placement="Bottom">
//placing above view here...
</Popover>
</core:FragmentDefinition>
But if I do that it will not show the page inside the popover because of some height issue. And I want to set the height of the popover based on the view height(popover content height).i tried by using popover contentHeight="auto" but this will not work.So how to show the popover based on its content?
There are no height and width property for the sap.m.Page control. However, the sap.ui.core.View does have height and width property. So, assign width and height to View and not page.
Code:
<mvc:View controllerName="controllerPath"
xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
xmlns:core="sap.ui.core" height="50rem"
width="50rem">
<Page >
<content>
//some content...
</content>
</Page>
</mvc:View>
Also, let the default width and height for Popover. Let me know if this works for your requirement.
Update: I gave 100% height and 100% width to the view embedded also set 100% for contentHeight and contentWidth of Popover. I got the entire page. Screenshot is attached.