1 Reply Latest reply on Jun 29, 2010 5:06 AM by Ilya Shaikovsky

    How to select individual cell in DataTable?

    Maynard Witten Newbie

      As far as I know then RichFaces DataTable does not support selection of individual cell (in opposit of PrimeFaces, but instead - as far as I know - PrimeFaces does not support column groups/bands) - is it possible to implement this feature simply in code - e.g. - put some panel inside the column (cell) and assign some hiddent variable and use this variable for determination exactly which cell has been selected?

       

      Another trouble I am having is that sometimes - when refresing (using rerender and Ajax) the datatable of panel with datatable and other components - I am experiencing some flricking or blurring. Are there some guidelines hot to avoid such blurrs?

        • 1. Re: How to select individual cell in DataTable?
          Ilya Shaikovsky Master

          you could implement it like:

           

          client side


          wrap all the column content with outputPanel with block layout. Additional div will be created in td. Then you could catch click events in order to add some highlighting and remove previous one using simple jquery selectors and css classes related method methods calls.

           

          server side synchronization

          put a4j:support with onclick event to this output panel or use jsFunction call after highlight method calls - it will rise request after the click on cell. Pass some parameters(row identifier, cell identifier) with a4j:param. So you will be able to catch the property of some object which was selected on server side.

           

          NOTE if you will choose to use support and not jsFunction - highlighting js stuff should be called from onsubmit of that support. Because RF not supports definitions of event attributes together with using support on the same event.