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:
EDIT
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 <asp:content>
tags. So - I'm assuming in my page where I'm not inheriting the MasterPage I'm missing either an control reference or a javascript library that I get with said MasterPage. Still working so more to come.
Edit 2
Still at a loss as to why it wont work from Client App Part standard page vs a normal App Page. The only difference appears to be with the master page reference, but even toying around with the referenced assemblies and javascript libraries I can't get it to render. The down side of using the App web page is you still get all the overhead of the master page.