Java Primefaces 3.5仪表板组件
我想实现我在Java Primefaces 3.5仪表板组件,java,eclipse,jsf,primefaces,Java,Eclipse,Jsf,Primefaces,我想实现我在*.xhtml页面中使用的pf 3.5: <p:growl id="growl" showDetail="true" /> <p:dashboard id="board" model="#{dashboardBean.model}"> <p:ajax event="reorder" listener="#{dashboardBean.handleRe
*.xhtml
页面中使用的pf 3.5:
<p:growl id="growl" showDetail="true" />
<p:dashboard id="board" model="#{dashboardBean.model}">
<p:ajax event="reorder" listener="#{dashboardBean.handleReorder}"
update="growl" />
<p:panel id="products" header="Products">
<h:outputText value="Product Content" />
</p:panel>
<p:panel id="plans" header="Plans">
<h:outputText value="Plans Content" />
</p:panel>
<p:panel id="notes" header="Notes">
<h:outputText value="Notes Content" />
</p:panel>
</p:dashboard>
然而,当我在服务器上打开我的页面时,什么都没有显示。我的html输出:
<form id="form" enctype="application/x-www-form-urlencoded" action="/ProductOverview.xhtml" method="post" name="form">
<input type="hidden" value="form" name="form">
<span id="form:growl"></span>
<div id="form:board" class="ui-dashboard"></div>
<input id="j_id1:javax.faces.ViewState:0" type="hidden" autocomplete="off" value="-5329509311621774370:-4596343252720161135" name="javax.faces.ViewState">
</form>
非常感谢您的回复 您的xhtml页面可能有错误。您正在引用
#{dashboardBean.handleorder}
,我在您的代码中看不到它(除非您没有发布它),如果bean中没有方法handleorder,那么它将无法正确构建页面
因此,请删除侦听器方法或创建它方法。添加
@ManagedBean
和@SessionScoped
(例如)注释
像这样
@ManagedBean
@SessionScoped
public DashboardBean(){
添加
@ManagedBean
和@SessionScoped
注释怎么样?像这个public@ManagedBean@SessionScoped public DashboardBean()
Daniel请写下来作为答案,我会接受的!添加ManagedBean和SessionScoped对您有用吗?我也有同样的问题,但是将这两个注释添加到我的支持bean中是不起作用的。该页不呈现任何内容。您是否在标题中添加任何css或js?我使用的是PrimeFaces3.5
@ManagedBean
@SessionScoped
public DashboardBean(){