1 Reply Latest reply on Jun 30, 2009 8:02 AM by panky_p

    reRender a row AND a column in a datatable?

    Patrick Fittkau Newbie

      Hi all!

      I've searched quite a bit and tried even more, but I'm either blind or what I try to accomplish just isn't possible.

      What I'm searching a solution for is this: Updating one row AND one column of a rich:datatable.
      I need something like this when I have one row in the table I want to edit/modify and all the action-buttons for the other rows need to be disabled. (The not-so-nice solution to do this is by using javascript)

      I know that I can update one or more rows of a datatable by using ajaxKeys. I've tried to add the id of the column I want to rerender additionaly to th reRender-attribute, but it seems this also uses the ajaxKeys.

      What I also tried was to update the column by adding all row-ids to the ajaxKeys and then adding the full id of the row-content I want to rerender.
      That looked like this: reRender="theColumn,#{rich:clientId('aDivInThisRow')}" ... but although the id of the row is always calculated correctly, richfaces tells me that the id (something like 'root:theTable:0:aDivInThisRow') couldn't be found (though the id IS in the document). Adding a ':' before the id to get an absoulte path to the component doesn't help either.

      I also experimented with a4j:outputPanel with ajaxRendered set to true, but it seems I haven't understood how this is supposed to work. In the datatable they never update.

      I also had an experiment with a4j:ajaxListener, but that worked even less.

      Any help on this matter would be nice. :)
      And if any of these ways was already the right direction, then I'm just not able to build a working example out of it. Any pointers to examples or forum-threads would be appreciated too, since I have spent many hours searching forums and the internet in general and either find nothing at all or endless unrelated stuff.

      ... may be it isn't possible after all and javascript is the right way to do this.


      ... oh... and apologies if my english is bad.