I'm trying to display a list view inside a client web part (for SharePoint hosted App). The below code will work inside an app page but does not render in a client web part. There are no errors being surfaced - the web part itself seems to render but there is no content. I am quite sure I'm missing something trivial, but it's escaping me at the moment.
<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server"> <WebPartPages:SPWebPartManager ID="SPWebPartManager1" runat="Server"/> </SharePoint:AjaxDelta> <WebPartPages:WebPartZone runat="server" FrameType="None" ID="full" Title="loc:full"> <WebPartPages:XsltListViewWebPart ID="XsltListViewWebPart_AppWeb" runat="server" ListUrl="Lists/FormData" IsIncluded="True" NoDefaultStyle="TRUE" Title="FormData" PageType="PAGE_NORMALVIEW" Default="False" ViewContentTypeId="0x"> </WebPartPages:XsltListViewWebPart> </WebPartPages:WebPartZone>
Just to show - this is a small screenshot of the rendered page with client web part - the web part itself is rendering - but no list data:
Ok - making some progress. Instead of using the default webpart page created from VS I pointed to the existing app page that does render. You have to add
<WebPartPages:AllowFraming ID="AllowFraming" runat="server" />
The difference with this page - it inherits the app masterpage and the controls are in