make layoutunit close or open

UI Components for JSF
Post Reply
klungie
Posts: 12
Joined: 24 Mar 2010, 10:23
Location: Semarang, Indonesia
Contact:

25 Mar 2010, 13:39

Hi there,

Is there a way to command layoutUnit open or close based on some other event.
For example I want to instruct a layoutUnit to be closed, when user clicks on a commandButton.
Is it anyway possible ?

Thanks a bunch.

nitin_o
Posts: 17
Joined: 06 Nov 2009, 08:43

26 Mar 2010, 10:45

LayoutUnit has a property "closed" to which you can bind a backing bean boolean property.

You can then switch the boolean state on the commandButton click.

Nitin.

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

29 Mar 2010, 03:09

You can use the client side api for this;

Layout has a simple getManager API you can access with widgetVar.

Code: Select all

<p:layout widgetVar="layout">
...
Then with javascript;

Code: Select all

layout.getManager().toggle('paneId');
See the full client side api of methods at;

http://layout.jquery-dev.net/documentat ... es_Methods

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 46 guests