3 Replies Latest reply on Jun 23, 2010 2:22 AM by jsfgeeks

    Want to open modalPanel onRowClick event of extendedDataTable

    jsfgeeks

      Hi,

       

            I have an extendedDataTable, on which I have to open modalPanel when user clicks on any row/column (onRowClick or something like that) . Can anyone tell me how to do that? I have tried with the <rich:componentControl> inside the extendedDataTable, but its not opening.

       

      Thanks in advance,

      JSF GEEKS

        • 1. Re: Want to open modalPanel onRowClick event of extendedDataTable
          akaine
          <rich:extendedDataTable value="#{agendaBean.listaDeHoras}" var="item">
              <f:facet name="header">
                  <rich:columnGroup>
                      <rich:column>
                          <h:outputText value="Column_1" />
                      </rich:column>
                      <rich:column>
                          <h:outputText value="Column_2" />
                      </rich:column>
                  </rich:columnGroup>
              </f:facet>
          
              <rich:column>
                  <h:outputText value="#{item.someValue1}" />
              </rich:column>
              <rich:column>
                  <h:outputText value="#{item.someValue2}"/>
              </rich:column>
              <a4j:support event="onRowDblClick" reRender="myModalPanelId" action="#{managedBean.someAction}"
                  oncomplete="#{rich:component('myModalPanelId')}.show();" />
          </rich:extendedDataTable>
          

           

           

          Alternatively for the oncomplete attribute you could use: oncomplete="#{'Richfaces.showModalPanel(\'myModalPanelId\');'}" which can be usefull in multiple js actions and form validation conditional expressions.

          • 2. Re: Want to open modalPanel onRowClick event of extendedDataTable
            jsfgeeks

            Thanks for your support,

             

                I'll try it.

             

            Thanks,

            JSF GEEKS

            • 3. Re: Want to open modalPanel onRowClick event of extendedDataTable
              jsfgeeks

              Hi Akaine Harga,

               

                   Thanks for your kind support. It works fine for me.

               

              Regards,

              JSF GEEKS