-
1. Re: ExtendedDataModel / arrangeableState always set to null
nbelaevski Jun 13, 2011 12:45 AM (in response to fred-at-coding)Hi Fred,
Please check that you have defined all necessary component attributes on the page (refer to demo example).
-
2. Re: ExtendedDataModel / arrangeableState always set to null
fred-at-coding Jun 14, 2011 4:26 PM (in response to nbelaevski)Hi Nick,
thanks for your reply. Unfortunely I haven't seen your response, so i'm late
here is my code (i've tested it with 4.0.0 final, 4.0.1-SNAPSHOT, 4.1.0-SNAPSHOT)
<h:form id="AuthorForm">
<a4j:outputPanel id="sample1">
<rich:dataTable id="AuthorDataTable1" rows="10" value="#{MB_Author_Dev.authorDataModel}" var="author" keepSaved="true" iterationStatusVar="iteratorIndex">
<rich:column
sortBy="name"
sortOrder="#{MB_Author_Dev.sortOrders['name']}"
filterExpression="name"
filterValue="#{MB_Author_Dev.filterValues['name']}">
<f:facet name="header">
<h:inputText id="filteringName" name="filteringName" value="#{MB_Author_Dev.filterValues['name']}"/>
</f:facet>
<h:outputText value="#{author.name} #{author.firstname}" id="author_row_id"/>
</rich:column>
<f:facet name="footer">
<rich:dataScroller for="AuthorDataTable1" maxPages="10" id="AuthorDataTableDataScroller1" render="AuthorDataTable1"/>
</f:facet>
</rich:dataTable>
</a4j:outputPanel>
</h:form>
Do you think I've missed some fields?
The back code is the same as your example. The only thing I've changed:
@Override
public void arrange(FacesContext context, ArrangeableState state) {
syslog.info("[XdDataScroller,arrange] - this method was invoked, state=" + state);
arrangeableState = state;
}
the log is always saying: state=NULL ...
Thanks again Nick.
Regards Fred
-
3. Re: ExtendedDataModel / arrangeableState always set to null
fred-at-coding Jun 14, 2011 4:49 PM (in response to fred-at-coding)Nick,
one precision. I've copied/paste some of your code. It's working... the state is NOT null.
"
INFO: [XdDataScroller,arrange] - this method was invoked, state=org.richfaces.model.ArrangeableStateDefaultImpl@a4b975
"
You were right. But I don't see my mistake. It's working when I use the "JPAColumn.xhtml" code. I'll check it.
Thanks again
Best Regards
Fred
-
4. Re: ExtendedDataModel / arrangeableState always set to null
fred-at-coding Jun 18, 2011 9:10 AM (in response to fred-at-coding)Hi,
i've found it.
Instead of:
<rich:column
sortBy="name"
sortOrder="#{MB_Author_Dev.sortOrders['name']}"
filterExpression="name"
filterValue="#{MB_Author_Dev.filterValues['name']}">
...
</rich:column>
it 's better to do:
<rich:column
sortBy="#{name}"
sortOrder="#{MB_Author_Dev.sortOrders[name]}"
filterValue="#{MB_Author_Dev.filterValues[name]}"
filterExpression="#{name}"
>
...
</rich:column>
Fred
-
5. Re: ExtendedDataModel / arrangeableState always set to null
kiler Aug 7, 2012 3:30 AM (in response to fred-at-coding)Hi,
Could you explain when the arrange method is called or by which component ? If I good understend this method set arrangeableState variable, if so, how to call it ?
A lot fo Thanks for any answer.
Any one can help ??
Thanks,
Kiler
-
6. Re: ExtendedDataModel / arrangeableState always set to null
kiler Aug 7, 2012 7:53 AM (in response to nbelaevski)Hi Nick,
Which of component attributes do you exactly think ?
I have still this problem, because arrange method is never call and arrangeableState is set to null.
-
7. Re: ExtendedDataModel / arrangeableState always set to null
yan.langlois Aug 14, 2014 5:07 PM (in response to kiler)Hi,
The method arrange is called only if your dataModel implements Arrangeable. The component attributes are filterValue and filterExpression of the <rich:column />