can't close and collapse layoutunit in a form

UI Components for JSF
muwooer
Posts: 22
Joined: 23 Sep 2011, 03:54

16 Nov 2011, 09:58

I put a fullPage p:layout in a h:form like this :
<h:form>
<p:layout id="globle_layout" fullPage="true">
<p:layoutUnit id="globle_westLayoutUint" header="tools" position="west" size="230" closable="true" collapsible="true">
</p:layoutUnit>
</p:layout>
</h:form>

But the layoutUnit's close and collapse button can't work. Is this a bug? Or the layout can't put in a form?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

16 Nov 2011, 13:53

A Layout should always have a layoutUnit with position="center".
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

muwooer
Posts: 22
Joined: 23 Sep 2011, 03:54

16 Nov 2011, 18:09

I have a center layoutunit. This is a part of my full sourece code.

muwooer
Posts: 22
Joined: 23 Sep 2011, 03:54

18 Nov 2011, 03:51

And I modify the showcase, put p:layout in a h:form. Then the west and east layoutunit can't be closed and collapsed. Is this a bug?

snlm95
Posts: 10
Joined: 25 Feb 2012, 06:07

25 Feb 2012, 06:30

Just wondering, has this issue been solved?

Am using ver 3.1.1 and still facing the same problem.

Basically am using a menu located at the north layoutunit to perform jsf PPR on the center layoutunit, which is preloaded with a jsf page. Everything works fine, meaning all the collapsible/close buttons until I clicked the menu to reload the center layoutunit. Then the collapsible/close buttons do not work anymore. However, if the east/west/south panels have been collapsed before any menu is clicked, the expansion button still works after the PPR reloading. After expansion, the collapsible/close buttons stop working again. To make the collapsible/close buttons work again, I need to use the browser reload button.

Just wondering if anyone can shed some light?

===============================================================================================

<p:layoutUnit id="top" position="north" size="50" >
<h:form>
<p:menubar autoSubmenuDisplay="true" style="width:99%">
<p:menuitem value="Travel Request" id="menu_TravelRequest" actionListener="#{urlBean.setUrl}" update=":contentpnl"></p:menuitem>
</p:menubar>
</h:form>
</p:layoutUnit>


<p:layoutUnit position="south" size="100" header="Bottom" resizable="true" closable="true" collapsible="true">
<h:outputText value="South unit content." />
</p:layoutUnit>

<p:layoutUnit position="west" size="200" header="Left" resizable="true" closable="true" collapsible="true">
</p:layoutUnit>

<p:layoutUnit position="east" size="200" header="Right" resizable="true" closable="true" collapsible="true" effect="drop">
<h:outputText value="Right unit content." />
</p:layoutUnit>

<p:layoutUnit position="center">
<h:panelGroup id="contentpnl" layout="block">
<ui:include src="#{urlBean.url}.xhtml" />
</h:panelGroup>
</p:layoutUnit>

snlm95
Posts: 10
Joined: 25 Feb 2012, 06:07

26 Feb 2012, 11:43

In fact, not only the collapsible/close buttons, many components (such as p:selectOneMenu, p:dataTable navigation buttons) too stop functioning if they are part of the center layout unit's jsf, dynamically loaded using the <ui:include src="#{urlBean.url}.xhtml" /> tag.

To get those to function properly, the browser reload button has to be pressed.

Has anyone any idea on how to resolve this?

snlm95
Posts: 10
Joined: 25 Feb 2012, 06:07

28 Feb 2012, 06:04

Anyone? No?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

28 Feb 2012, 09:21

I have no problem with components placed in (center) layout unit when they get updated. But I don't use dynamic includes and I use pe:layout from PF Extensions project. This can be issue with dynamic includes (maybe script order or whatever else). Can you try with rendered=true/false instead of dynamic includes?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

28 Feb 2012, 12:59

If you read the User Guide about the layout component it quickly becomes clear how layout in fullPage mode actually works.

1- You should not enclose the layout component in a form component
2- each layoutUnit needs it own enclosing form in order to work correctly.

This does not hold for the default fullPage setting of layout, where a form enclosing the layout component is required.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

snlm95
Posts: 10
Joined: 25 Feb 2012, 06:07

05 Mar 2012, 14:45

Thanks oleg and andyba for your kind reply.

Oleg, where should the rendered=true/false be attached to? To the <h:panelGroup>?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests