egbokul
egbokul

Reputation: 3974

JSF2 / Primefaces layout performance

Right now I'm using a full page layout and p:layoutUnits and page composition in my webapp. I have a fixed header with a menubar, and a content layoutunit, and that's all. It was easy to set up, but in IE (7) when I navigate to a new page the whole page reloads (visibly), the header is cleared then loaded, and - even more annoyingly - the menubar is displayed for a second with all the menuitems visible.

In other browsers this effect is not really visible, sadly, IE 7 is my target.

Now I'm thinking about saying goodbye to p:layoutUnits and implementing the layout with simple css magic and fixed div for the header - would it improve display in IE? Is there anything else I can do to make it faster and smoother? I'd like it to look like the header is not changing at all, only the content.

How about using iframe? Would it allow bookmarkable URLs?

Upvotes: 1

Views: 3508

Answers (3)

Ryan M.
Ryan M.

Reputation: 141

For those struggling with layouts, follow BalusC and use simple divs/css and JSF 2.0 Templating. I started with PrimeFaces layouts and could never get it to work with complicated designs.

http://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/

Upvotes: 0

Jim Tough
Jim Tough

Reputation: 15210

I see this is an old question, but I'll throw in a new answer anyway...

PrimeFaces 3.0 <p:dataTable> supports in-table scrolling. You set a fixed height and width for the data table on your page and within that box the data table is rendered with a scrollbar. The column headers and footers stay put and you just scroll the rows. They just cleaned up some format bugs in their nightly snapshot builds that make the <p:dataTable> look great in IE 7. Might be worth a second look at PrimeFaces for those who (like me) have to support older IE browsers.

LINK: PrimeFaces 3.0 Showcase (scrollable data table)

Upvotes: 1

egbokul
egbokul

Reputation: 3974

I've finally decided to say goodbye to p:layout. I have a long table that's two or three times the size of the screen. If I put it in a scrollable layoutUnit then the scrolling is so slow that it is really annoying (tested in IE, Firefox and Chrome - equally slow). Perhaps this widget was not intended for this kind of use (displaying scrollable, long content), but now it is clear that I'll have to do a proper CSS design and stay with raw DIVs.

Nevertheless it was great for quickly putting together an application GUI that can be shown to customers.

Upvotes: 0

Related Questions