SelectOneMenu with layout=custom

UI Components for JSF
Post Reply
spadovan
Posts: 178
Joined: 05 Jun 2013, 12:04

30 Jan 2017, 17:27

SelectOneMenu with layout=custom does not work property in mobile mode.

Code: Select all

   <p:dataTable tableStyleClass="ui-table-columntoggle"
                      value="#{moduloBean.getValidRighe(dom.domandeList)}" var="linkedDom" rowIndexVar="linkedRowNum"
                      rendered="#{dom.tipoDomanda.tdmId.equals(14)}"  >
               <p:column>
                  <h:outputText value="#{localeBean.isItalian() ? linkedDom.domDescrIt : linkedDom.domDescrDe}" />
                  <p:selectOneRadio label="#{localeBean.isItalian() ? linkedDom.domDescrIt : linkedDom.domDescrDe}"
                           layout="custom"  id="radioGrid"
                           required="#{moduloBean.isDomandaObbligatoria(dom)}"
                           value="#{moduloBean.risposte.get(linkedDom).singleValue}"
                           disabled="#{moduloBean.isDomandaDisabilitata(dom)}">
                      <p:ajax update="@form:list" listener="#{moduloBean.clearDisabledValues(dom)}" />
                      <f:selectItems value="#{moduloBean.getSelectItems(dom)}" />
                  </p:selectOneRadio>
               </p:column>

               <p:column headerText="#{moduloBean.getOpzDescr(dom, 0)}" rendered="#{moduloBean.getOpzDescr(dom, 0) != null}" style="text-align:center">
                    <p:radioButton for="radioGrid" itemIndex="0"/>
               </p:column>
               <p:column headerText="#{moduloBean.getOpzDescr(dom, 1)}" rendered="#{moduloBean.getOpzDescr(dom, 1) != null}" style="text-align:center">
                    <p:radioButton for="radioGrid" itemIndex="1"/>
               </p:column>
   </p:dataTable>
in othe output page the selectOneMenu component is displayed even if it wouldn't and the value attribute of p:radioButton is not setted.

You can reproduce the problem using PF Showcase and the example shown on SelectOneRadio with custom layout

Code: Select all

 <h3>Custom Layout</h3>
    <p:outputPanel id="customPanel" style="margin-bottom:10px">
        <p:selectOneRadio id="customRadio" value="#{radioView.color}" layout="custom">
            <f:selectItem itemLabel="Red" itemValue="Red" />
            <f:selectItem itemLabel="Green" itemValue="Green" />
            <f:selectItem itemLabel="Blue" itemValue="Blue" />
        </p:selectOneRadio>
 
        <h:panelGrid columns="3" cellpadding="5">
            <p:radioButton id="opt1" for="customRadio" itemIndex="0" />
            <h:outputLabel for="opt1" value="Red" />
            <p:spinner />
 
            <p:radioButton id="opt2" for="customRadio" itemIndex="1" />
            <h:outputLabel for="opt2" value="Green" />
            <p:inputText />
 
            <p:radioButton id="opt3" for="customRadio" itemIndex="2" />
            <h:outputLabel for="opt3" value="Blue" />
            <p:calendar />
        </h:panelGrid>
    </p:outputPanel>
 
Primefaces 12.0.2, Wildfly 24.0.1, JDK 11

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests