SelectOneMenu height issue

Post Reply
Polser
Posts: 3
Joined: 14 Aug 2015, 08:42

07 Jul 2017, 17:45

I use the following code to show data in SelectOneMenu component:

Code: Select all

<div class="ui-g ui-fluid">	
	<div class="ui-g-12 ui-lg-6">
		<div class="card card-w-title">
                    <h1>SelectOneMenu</h1>
                    <p:panelGrid columns="1" style="margin-bottom:10px" layout="grid" styleClass="form-group ui-panelgrid-blank">
                    	<p:selectOneMenu id="car" style="margin-bottom:10px;">
                            <f:selectItem itemLabel="Select One" itemValue="" />
                            <f:selectItem itemLabel="Select Two" itemValue="" />  
                            <f:selectItem itemLabel="Select Three" itemValue="" />  
                            <f:selectItem itemLabel="Select Four" itemValue="" />                             
                        </p:selectOneMenu>                      
                    </p:panelGrid>
                </div>
            </div>
         </div>
But the following is displayed:

Image

There is a space between the component and the selectItems. I haven't change any css code, so I wonder what the problem is because in the paradise template live preview is everything fine. Do you have an idea?

User avatar
aragorn
Posts: 2984
Joined: 29 Jun 2013, 12:38

10 Jul 2017, 11:16

Interesting! I couldn't replicate this issue with your sample code. My test page;

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">Test</ui:define>

    <ui:define name="content">    

        <div class="ui-g ui-fluid">	
            <div class="ui-g-12 ui-lg-6">
                <div class="card card-w-title">
                    <h1>SelectOneMenu</h1>
                    <p:panelGrid columns="1" style="margin-bottom:10px" layout="grid" styleClass="form-group ui-panelgrid-blank">
                        <p:selectOneMenu id="car" style="margin-bottom:10px;">
                            <f:selectItem itemLabel="Select One" itemValue="" />
                            <f:selectItem itemLabel="Select Two" itemValue="" />  
                            <f:selectItem itemLabel="Select Three" itemValue="" />  
                            <f:selectItem itemLabel="Select Four" itemValue="" />                             
                        </p:selectOneMenu>                      
                    </p:panelGrid>
                </div>
            </div>
        </div>

    </ui:define>

</ui:composition>
Which PrimeFaces version are you using? And could you please try it with our sample project?

Polser
Posts: 3
Joined: 14 Aug 2015, 08:42

10 Jul 2017, 16:18

Thanks for the response. It was my fault. I had a blockUI component in the template.xhtml. This forced the space between SelectBox and selectItems. So there is no issue and this case can be closed. Thanks anyway.

User avatar
aragorn
Posts: 2984
Joined: 29 Jun 2013, 12:38

10 Jul 2017, 16:33

Thanks a lot for the update!

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest