Dashboard panel disappearing on refresh

UI Components for JSF
Post Reply
TMA
Posts: 3
Joined: 09 Apr 2011, 21:10

12 May 2011, 23:28

Hi
I have a problem that can be recreated in Showcase (2.2.1) and Labs Showcase (3.0), in Firefox 4.0.1 and Chrome 11.0.696.68.
When moving a panel in Dashboard to another column to item index zero and then hit refresh (F5), a panel in the column disappears.
In Showcase I get the followning growl when moving: Reordered: sports Item index: 0, Column index: 1, Sender index: 0. After refresh Lifestyle disappears.
Thanks
/Tomas
PrimeFaces 3.0, Mojarra 2.0.3 (b05), JBoss 6.0.0 Final, Java 1.6.0_23, Windows 7

TMA
Posts: 3
Joined: 09 Apr 2011, 21:10

13 May 2011, 09:46

Solved this by creating new DashboardModel on each call to get model, eg:

public DashboardModel getModel()
{
// build up model from own model structure
DashboardModel dashboard = new DefaultDashboardModel();

for(RpgLayoutColumn rpgColumn : getLayout().getLayoutColumns())
{
DashboardColumn column = new DefaultDashboardColumn();
dashboard.addColumn(column);
for(RpgLayoutItem rpgItem : rpgColumn.getLayoutItems())
{
column.addWidget(rpgItem.getAttributeId());
}
}
return dashboard;
}

Read somewhere that you should have your DashboardModel in RequestScoped, this probably solves this too.

/Tomas
PrimeFaces 3.0, Mojarra 2.0.3 (b05), JBoss 6.0.0 Final, Java 1.6.0_23, Windows 7

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Mordets and 11 guests