cbender
cbender

Reputation: 2251

How to get all rich:dataTable values using javascript when rich:dataScroller is used?

I have a <rich:dataTable> and implemented pagination using <rich:dataScroller>

<rich:dataTable id="myTable" rows="5" rowKeyVar="rowVar" value="#{Bean.collectionInBean}" var="myVar">
<!--Table Data-->
</rich:dataTable>
<rich:dataScroller for="myTable" />

When not using the data scroller (I don't use the rows attribute in the data table either when not using the scroller) I can select all of the the values in a column of the table using jQuery to select elements using the id of the column's cell content. So if I have a column of <h:inputText id="myInput" value=#{myVar.inputReceiver} /> I can loop through all of them and let's say get their values using:

var elements = $("[id*='myInput']");
for(var i = 0; i < elements.length; i++){
  var value = elements[i].value;
  //do whatever with value
}

But once I use the <rich:dataScroller> the only values returned are the ones that are on the page that is currently selected. Is there a way to get all of them while still using <rich:dataScroller>?

Upvotes: 0

Views: 637

Answers (1)

Makhiel
Makhiel

Reputation: 3884

There isn't. The purpose of the component is to show only a portion of the data at a time.

Upvotes: 0

Related Questions