I'm trying to implement the core piechart into a PrimeFaces mobile page but it's not visible.
With PrimeFaces core it looks like this: http://i.imgur.com/JQBK0jA.png
With PrimeFaces mobile it looks like this: http://i.imgur.com/mr3oLb4.png
... and this is the xhtml-content of the mobile page:
Code: Select all
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile"
contentType="text/html"
renderKitId="PRIMEFACES_MOBILE">
<pm:page title="Dashboard">
<pm:view id="main">
<pm:header title="Dashboard"/>
<pm:content>
<h:form id="form">
<p:pieChart id="pieChart" value="#{pieData.pieModel}" legendPosition="w" style="width:400px;height:300px" />
<br/>
<p:commandButton value="Update" actionListener="#{pieData.Update}" />
<p:remoteCommand name="updatePieCharts" update="pieChart" />
</h:form>
<p:socket onMessage="handleMessage" channel="/pie" />
<script type="text/javascript">
function handleMessage()
{
updatePieCharts();
}
</script>
</pm:content>
</pm:view>
</pm:page>
</f:view>