6 Replies Latest reply on Feb 19, 2009 9:47 AM by Bernard Labno

    inplaceInput inside rich:table

    davide ficano Newbie

      I need to use inplaceInput inside a table (rich:table).
      The table contains many inplaceInput in any row and in different columns.


      How can I detect which row/column is modified?
      Somebody can post some snippet of clear code?



      Below the pseudo code about my table


      <rich:dataTable id="list"
          rowClasses="odd,even"
          value="#{iesimoAnno}"
          var="i"
          rowKeyVar="row">
      
          <rich:column>
            <f:facet name="header">
              <h:outputText value="#{messages['curriculum.peso.label']}" />
            </f:facet>
      
              <rich:inplaceInput
                  layout="block"
                  value="#{i.insegnamento.peso}"
                  id="peso#{status.index}"
                  required="true"
                  requiredMessage="#{messages['mandatory.value.at.row']}"
                  changedHoverClass="hover"
                  viewHoverClass="hover"
                  viewClass="inplace"
                  changedClass="inplace"
                  selectOnEdit="true"
                  validatorMessage="#{messages['invalid.value.at.row']}">
                                
                  <a4j:support
                    event="onviewactivated"
                    reRender="listAnno#{status.index}, messages#{status.index}"
                    rendered="#{!i.modulo and !i.insegnamento.gruppo}"
                   />
              </rich:inplaceInput>
      
          </rich:column>
      
      
      
          <rich:column>
            <f:facet name="header">
              <h:outputText value="#{messages['curriculum.durata.label']}" />
            </f:facet>
      
              <rich:inplaceInput
                  layout="block"
                  value="#{i.insegnamento.durata}"
                  id="durata#{status.index}"
                  required="true"
                  requiredMessage="#{messages['mandatory.value.at.row']}"
                  changedHoverClass="hover"
                  viewHoverClass="hover"
                  viewClass="inplace"
                  changedClass="inplace"
                  selectOnEdit="true"
                  validatorMessage="#{messages['invalid.value.at.row']}">
                                
                  <a4j:support
                    event="onviewactivated"
                    reRender="listAnno#{status.index}, messages#{status.index}"
                    rendered="#{!i.modulo and !i.insegnamento.gruppo}"
                   />
              </rich:inplaceInput>
      
          </rich:column>
      
      </rich:dataTable >