toggle <p:layoutUnit>

UI Components for JSF
Post Reply
mario.caseiro
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....

callahan
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.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

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.

http://developer.yahoo.com/yui/docs/YAH ... ayout.html
http://developer.yahoo.com/yui/docs/YAH ... 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.

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

28 Sep 2010, 05:31

Hello,

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

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests