The dashboard doesn't work as expected. There is only panel in 3rd column in my dashboard. When i move it to 2nd Column, then the 3rd column disappears. Then, i am not able to move any other panel into 3rd column
Here is my code
Code: Select all
<p:dashboard model="#{HomeBean.objDashboardModel}">
<p:panel id ="finance" style="width:200px;margin-right: 30px;" >
Backing dashboard model simply defines the number of columns and defines the widgets
to be placed in each column. Additionally dashboardcolumn is used to define a column in
layout. APIs for these classes are;
</p:panel>
<p:panel id ="eco" style="width:200px;margin-right: 30px;" >
Backing dashboard model simply defines the number of columns and defines the widgets
to be placed in each column. Additionally dashboardcolumn is used to define a column in
layout. APIs for these classes are;
</p:panel>
<p:panel id ="oc" style="width:200px;margin-right: 30px;">
Backing dashboard model simply defines the number of columns and defines the widgets
to be placed in each column. Additionally dashboardcolumn is used to define a column in
layout. APIs for these classes are;
</p:panel>
<p:panel id ="accounts" style="width:200px;margin-right: 30px;" >
Backing dashboard model simply defines the number of columns and defines the widgets
to be placed in each column. Additionally dashboardcolumn is used to define a column in
layout. APIs for these classes are;
</p:panel>
</p:dashboard>
Code: Select all
*/
@ManagedBean(name = "HomeBean")
@RequestScoped
public class HomeBean {
private DashboardModel objDashboardModel;
public DashboardModel getObjDashboardModel() {
return objDashboardModel;
}
public void setObjDashboardModel(DashboardModel objDashboardModel) {
this.objDashboardModel = objDashboardModel;
}
@PostConstruct
public void init(){
objDashboardModel = new DefaultDashboardModel();
DashboardColumn leftGadgetColumn = new DefaultDashboardColumn();
DashboardColumn middleGadgetColumn = new DefaultDashboardColumn();
DashboardColumn rightGadgetColumn = new DefaultDashboardColumn();
leftGadgetColumn.addWidget("finance");
middleGadgetColumn.addWidget("eco");
rightGadgetColumn.addWidget("oc");
middleGadgetColumn.addWidget("accounts");
objDashboardModel.addColumn(leftGadgetColumn);
objDashboardModel.addColumn(middleGadgetColumn);
objDashboardModel.addColumn(rightGadgetColumn);
}
}