Page 1 of 1

toggle <p:layoutUnit>

Posted: 05 Jun 2010, 20:39
by mario.caseiro
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....

Re: toggle <p:layoutUnit>

Posted: 05 Jun 2010, 22:12
by callahan
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.

Re: toggle <p:layoutUnit>

Posted: 07 Jun 2010, 12:14
by cagatay.civici
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.

Re: toggle <p:layoutUnit>

Posted: 28 Sep 2010, 05:31
by abcconsulting
Hello,

Is there an example that demonstrate how to properly call a client side API on a prime faces component?