data List set page after getValue operation
-------------------------------------------
Key: TOMAHAWK-854
URL: https://issues.apache.org/jira/browse/TOMAHAWK-854
Project: MyFaces Tomahawk
Issue Type: Bug
Components: Extended Datatable
Affects Versions: 1.1.4-SNAPSHOT, 1.1.5-SNAPSHOT
Reporter: Vitaly Smyk
it's my fisr type here =)
this bug(feature?) disscusses early.
Discription:
1 first i'm has 100 rows with 10 pages
2 move to 6 page
3 change Data in getValue to 20 rows
after render response i'm has blank page with 0 rows but in dataScroller they
show 20 rows total and page 6
setFirst in method getValue has no effect.
after code review i can suggest this:
class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase
method: public void encodeInnerHtml(FacesContext facesContext, UIComponent
component)
place invoke getValue(uiData.getRowCount()) before invoke uiData.getFirst();
UIData uiData = (UIData) component;
ResponseWriter writer = facesContext.getResponseWriter();
// begin the table
// get the CSS styles
Styles styles = getStyles(uiData);
int first = uiData.getFirst();
int rows = uiData.getRows();
int last;
if (rows <= 0)
{
last = uiData.getRowCount();
}
else
{
last = first + rows;
if (last > uiData.getRowCount())
{
last=uiData.getRowCount();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira