7 Replies Latest reply on Apr 7, 2009 10:31 AM by Ioana Iacob

    Rich datatable magic

    Ioana Iacob Newbie

      Hello,

      I'll just paste the code, it's pretty obviuos what I'm trying to do (I hope).

      <rich:dataTable id="parametersTable" value="#{MyBean.paramsList}"
       var="par" reRender="dsParam"
       rendered="#{!empty MyBean.paramsList}"
       rows="7" width="100%" rowKeyVar="row">
       <!-- headers -->
       ...
      
      <rich:column>
       <rich:inplaceSelect value="#{par.flagUserSetting}"
       layout="block" viewClass="inplace"
       openOnEdit="true"
       valueChangeListener="#{MyBean.valueChanged}">
       <f:selectItems value="#{MyBean.flagSelectItems}" />
       <a4j:support event="onchange" reRender="parent" ignoreDupResponses="false" />
       </rich:inplaceSelect>
      </rich:column>
       <rich:column>
       <h:panelGroup> <rich:inplaceInput value="#{par.value}" layout="block" viewClass="inplace" rendered="#{MyBean.renderedVal}" />
      
       <h:outputText value="#{par.value}"
       rendered="#{!MyBean.renderedVal}" />
       </h:panelGroup> </rich:column>
      ...
      </rich:dataTable>
      


      Obviously, it does not work... maybe some refresh issues? In the listener I just set the renderedVal property to false/true in base of the new value of the inplace select (2 possible values).

      Thanks,
      Ioana.