0 Replies Latest reply on Jun 3, 2011 12:40 PM by Thiago Colebrusco

    rich:dataGrid with h:selectOneRadio

    Thiago Colebrusco Newbie



      I'm trying to use a rich:dataGrid to display a list of elements. But, inside of each element I have rich:panel with a h:selectOneRadio, wich after a event have to update itself to show another things, depending on the selection.


      What I did do is to make the calls to the getters and setters of my bean without passing by a method of ManagedBean. But, I don't know why, this only works after the second time I try to submit.


      My code:


      <rich:dataGrid id="grid" columnClasses="grid" width="auto" cellpadding="0" cellspacing="0"

                 columns="7" value="#{calendarioMB.datas}" var="res" >

          <rich:panel id="panel" styleClass="data #{res.estilo}" >

              <h:outputText value="#{res.formatado}" styleClass="#{res.estilo}"/>

              <div align="left">


                  <h:selectOneRadio rendered="#{res.renderOptions}" styleClass="itens-radio" layout="pageDirection"

                                    value="#{res.tipo}" id="radio" onchange="submit()" immediate="true" >

                      <f:selectItem itemLabel="Falta" itemValue="1" />

                      <f:selectItem itemLabel="Atraso" itemValue="2" />




                  <h:outputText rendered="#{res.tipoAtraso}" value="Atraso" />

                  <h:outputText rendered="#{res.tipoFalta}" value="Falta" />



              <h:outputText rendered="#{res.feriado}" styleClass="feriado" value="Feriado" />





      How can I fix this problem? I don't need to make it an Ajax request. I just have to update my panel, no matters if using Ajax Request or Regular request.




      Thiago Colebrusco



      EDIT --------


      Hello, I came here just to tell that I solved my problem.


      I just had to remove the attribute prependId="false" of my a4j:form. It seems that with this attribute, my data of the request was getting lost and wasn't filling my beans. But now everything is working well.


      I only wanted to know why the request was getting lost in the first time and worked in the other times.