admin-theme icon indicating copy to clipboard operation
admin-theme copied to clipboard

p:layout and pe:layout do not work

Open rmpestano opened this issue 7 years ago • 7 comments

From @Kameecoding on May 22, 2018 10:26

Issue Overview

p:layout and pe:layout do not work

Current Behaviour

Adding any of these layouts to the body doesn't work properly

Expected Behaviour

These should probably work

How to reproduce

Add a layout to the body,

<p:layout
 id="allContent"
 fullPage="false"
 style="height: 600px;"
 widgetVar="layout_pane">
  <p:layoutUnit
	  id="two_halves_left"
	  position="center">
  </p:layoutUnit>
  <p:layoutUnit
  	  id="two_halves_right"
	  position="east">
  </p:layoutUnit>
</p:layout>
Additional Information
  • AdminFaces version: RC15
  • PrimeFaces version: 6.1
  • JSF implementation: 2.2

Copied from original issue: adminfaces/admin-template#72

rmpestano avatar May 23 '18 17:05 rmpestano

Hi @Kameecoding,

can you share any screenshot? I'm interested to see the use case of p:layout within admin-template because this template was supposed to replace p:layout.

Thanks for reporting.

rmpestano avatar May 23 '18 17:05 rmpestano

From @Kameecoding on May 23, 2018 14:43

I am unable to screenshot it atm, but there isn't anything to see there, it doesn't render at all and all layout orientations have display: none; in css

On Wed, May 23, 2018, 16:26 Rafael M. Pestano [email protected] wrote:

Hi @Kameecoding https://github.com/Kameecoding,

can you share any screenshot? I'm interested to see the use case of p:layout within admin-template because this template was supposed to replace p:layout.

Thanks for reporting.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adminfaces/admin-template/issues/72#issuecomment-391366998, or mute the thread https://github.com/notifications/unsubscribe-auth/ATF4mqclS5KY2IZdFKtJwqfWxz11pic1ks5t1XGEgaJpZM4UIYL2 .

rmpestano avatar May 23 '18 17:05 rmpestano

I see but can you describe your usecase with p:layout? is it just to organize/align/position content? if yes I'd recommend bootstrap grid system or PrimeFaces grid css.

If it is something else can you provide a sample page?

rmpestano avatar May 23 '18 17:05 rmpestano

I see the visibility:hidden comes from a css file provided by Primefaces, AdminFaces theme doesn't style p:layout, see screenshot:

screenshot from 2018-05-23 14-14-34

Don't know why it comes with visibility hidden but you can fix that with following css rule:

 <ui:define name="body">
  <style type="text/css">
           body .ui-layout-unit {
               visibility: visible;
           }
       </style>
        <p:layout style="min-width:400px;min-height:200px;">
            <p:layoutUnit position="west" resizable="true" size="100" minSize="40" maxSize="200">
                West
            </p:layoutUnit>

            <p:layoutUnit position="center">
                Center
            </p:layoutUnit>
        </p:layout>
</ui:define>

I don't know if it has any side effects.

rmpestano avatar May 23 '18 17:05 rmpestano

From @Kameecoding on May 23, 2018 17:21

the use case is having a simple 2 pnael layout where right panel can be closed abd the two panel can be resized horizontally,this cannot really be achieved using the grid css, overriding the css doesn't make the components work, just makes them visible

On Wed, May 23, 2018, 19:17 Rafael M. Pestano [email protected] wrote:

I see the visibility:hidden comes from a css file provided by Primefaces, AdminFaces theme doesn't style p:layout, see screenshot:

[image: screenshot from 2016-10-07 17-15-25] https://user-images.githubusercontent.com/1592273/40440221-d9c6f9fc-5e93-11e8-93f1-ea651189af65.png

Don't know why it comes with visibility hidden but you can fix that with following css rule:

<ui:define name="body">

    <p:layout style="min-width:400px;min-height:200px;">
        <p:layoutUnit position="west" resizable="true" size="100" minSize="40" maxSize="200">
            West
        </p:layoutUnit>

        <p:layoutUnit position="center">
            Center
        </p:layoutUnit>
    </p:layout>

</ui:define>

I don't know if it has any side effects.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adminfaces/admin-template/issues/72#issuecomment-391429023, or mute the thread https://github.com/notifications/unsubscribe-auth/ATF4miVjKj5GONK5yEBF5xdfwYryZq9Eks5t1Zm4gaJpZM4UIYL2 .

rmpestano avatar May 23 '18 17:05 rmpestano

@rmpestano, do you know what causes this issue?

hsellik avatar Jul 04 '18 13:07 hsellik

Hi @DontSeeSharp,

at first glance I could not find the cause, need to dig deeper but probably after releasing AdminFaces RC16 unless someone take a look at it before.

rmpestano avatar Jul 04 '18 18:07 rmpestano