[Solved]SelectOneMenu field smaller than content

Locked
ClaudioC
Posts: 114
Joined: 26 Sep 2013, 10:40

30 Jun 2015, 12:18

Dear friends, I'm using sentinel 1.3. When I use <p:selectOneMenu > inside <div class="ContainerIndent"> I see that the size of the field is smaller than the content so I don't see the last 1/2 characters that are covered by the down-arrow..... my code is very simple:

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"
                xmlns:pe="http://primefaces.org/ui/extensions"
                template="/WEB-INF/template.xhtml">

    <ui:define name="content">
        <h:outputScript name="jquery/jquery.js" library="primefaces" target="head"/>
        <div class="Container100">
            <div class="ContainerIndent">
                <h:form id="ProfiloViewForm">
                    <p:panel id="basic" header="Info" style="margin-bottom:20px">
                        <p:panelGrid columns="2" rendered="#{userController.selected != null}">
                                 <p:selectOneMenu id="piede" value="#{userController.selected.profilo.piede}" >
                                     <f:selectItem itemLabel="Seleziona" itemValue="" />
                                     <f:selectItem itemLabel="Destro" itemValue="destro"/>
                                     <f:selectItem itemLabel="Sinistro" itemValue="sinistro"/>
                                     <f:selectItem itemLabel="Ambi-destro" itemValue="ambi-destro"/>                                
                            </p:selectOneMenu>
                     </p:panelGrid>
                 </p:panel>                
              </h:form>
            </div>
        </div>
    </ui:define>
</ui:composition>
Where is the problem ?
Last edited by ClaudioC on 02 Jul 2015, 17:19, edited 1 time in total.
Netbeans 8.1, PrimeFaces 5.3.10 + PrimeFaces Extensions 4.0, Glassfish ver4.1, Chrome with NetbeansPlugin

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

30 Jun 2015, 15:33

Please try with layout="grid";

Code: Select all

...
<p:panelGrid columns="2" rendered="#{userController.selected != null}" layout="grid">
   <p:selectOneMenu id="piede"  value="#{userController.selected.profilo.piede}">
      <f:selectItem itemLabel="Seleziona" itemValue="" />
      <f:selectItem itemLabel="Destro" itemValue="destro"/>
      <f:selectItem itemLabel="Sinistro" itemValue="sinistro"/>
      <f:selectItem itemLabel="Ambi-destro" itemValue="ambi-destro"/>                                
   </p:selectOneMenu>
</p:panelGrid>
...

ClaudioC
Posts: 114
Joined: 26 Sep 2013, 10:40

01 Jul 2015, 11:34

No it doesn't work. If I use layout="grid" I see this :

Image

The outputLabel and the relative field are too far and the SelectOneMenu lost the last chr.

If I use <h:panelGrid> instead <p:panelGrid> the selectOneMenu lost the last chr but outputLabel and relative field are close.
Netbeans 8.1, PrimeFaces 5.3.10 + PrimeFaces Extensions 4.0, Glassfish ver4.1, Chrome with NetbeansPlugin

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

01 Jul 2015, 12:08

Sorry, I tested with PF-5.2. But, I think you are using PF-5.2.x version. We made some changes for responsive feature on SelectOneMenu.
Replicated the issue on 5.2.x. I will work on it and get back to you.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

01 Jul 2015, 12:36

Please try;

Code: Select all

<style type="text/css">
   .ui-selectonemenu {
      padding-right: 2em !important;
   }
</style>
or you can add width for selectOneMenu

Code: Select all

<p:selectOneMenu id="piede" style="width:200px;" .../>

ClaudioC
Posts: 114
Joined: 26 Sep 2013, 10:40

02 Jul 2015, 17:18

I have added style="width:200px;" and it works.

Thanks
Netbeans 8.1, PrimeFaces 5.3.10 + PrimeFaces Extensions 4.0, Glassfish ver4.1, Chrome with NetbeansPlugin

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

03 Jul 2015, 09:19

Glad to hear, thanks!

next801
Posts: 5
Joined: 27 Jan 2017, 20:57

27 Jan 2017, 21:04

Excellent post. Thank you very much!!

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

27 Jan 2017, 22:01

Glad to hear, thanks!

Locked

Return to “Sentinel”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests