This content has been marked as final.
Show 5 replies
-
1. Re: richfaces ListDataModel
errorken Jul 21, 2008 3:49 PM (in response to errorken)Btw; the classCast occurs in "ScrollableTableDataModel" (of which ListDataModel extends) on line 76: public void walk(FacesContext context, DataVisitor visitor, Range range,
Object argument)
ScrollableTableDataRange sequenceRange = (ScrollableTableDataRange) range;
Its a 'SequenceRange' and not a 'ScrollableTableDataRange' which is being passed. -
2. Re: richfaces ListDataModel
konstantin.mishin Jul 22, 2008 10:38 AM (in response to errorken)We need more info about your problem. Attach sources, please.
-
3. Re: richfaces ListDataModel
errorken Jul 22, 2008 1:46 PM (in response to errorken)Well, there is not much source to it :)
I have a backingbean 'testBean' which exposes this method:public ListDataModel getDataTableModel() { ListDataModel model = new ListDataModel(); List<Person> list = new ArrayList<Person>(); for (int i = 0; i < 100; i++) { Person p = new Person(); p.setFirstName("firstname " + i); p.setName("name " + i); list.add(p); } model .setWrappedData(list); return model; }
Then I have my dataTable, on which binds to the 'testBean' getDataTableModel method:<rich:dataTable id="dataTable" value="#{testBean.dataTableModel}" var="row" rows="10"> <f:facet name="header"> <rich:column breakBefore="true"> <rich:datascroller for="dataTable" immediate="true" ajaxSingle="true" /> </rich:column> </f:facet> <rich:column sortable="true"> <h:outputText value="#{row.name}"/> </rich:column> <rich:column sortable="true"> <h:outputText value="#{row.firstName}"/> </rich:column> </rich:dataTable>
The 'person' class just has the 2 properties "name" and "firstName" which are both string and both have get/set accessors. -
4. Re: richfaces ListDataModel
user080701 Jul 23, 2008 2:09 AM (in response to errorken)Hi,
Has any updated in this issue?
I have the same problem. -
5. Re: richfaces ListDataModel
konstantin.mishin Jul 24, 2008 9:17 AM (in response to errorken)Doesn't use any subclasses of
ScrollableTableDataModel as the 'value' to the dataTable.