toggle <p:layoutUnit>

Components, Ajax Framework, Utilities and More.
Post Reply
Posts: 3
Joined: 05 Jun 2010, 18:12

05 Jun 2010, 20:39

How can I control toggleing on <p:layoutUnit> ?

Is there any way to collapse, expand, a <p:layoutUnit> with something like <rich:componentcontrol for="myLayoutUnit" operation="collapse" >

I need to collapse and expand some layoutUnits on onload page. Without clicking anythinig, no links, no buttons....

Posts: 768
Joined: 27 May 2010, 22:52

05 Jun 2010, 22:12

If you always want the p:layout collapsed when the page is loaded, the p:layout tags collapsed attribute can simply be set to true.

User avatar
Posts: 17719
Joined: 05 Jan 2009, 00:21
Location: Cybertron

07 Jun 2010, 12:14

You can use the client side api, almost every PrimeFaces components has a full blown client side api you can access with widgetVar. ... ayout.html ... tUnit.html

As you see there are methods like toggle(), collapse(), resize() and more. You just need to get the layoutunit by id and call these methods from wherever you want.

Posts: 7
Joined: 17 Sep 2010, 19:28

28 Sep 2010, 05:31


Is there an example that demonstrate how to properly call a client side API on a prime faces component?
Mojarra 2.2.2 , PrimeFaces-4.0 on vFabric tc Server v2.9

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot], MarkWinton and 22 guests