Alguem sabe que erro é esse:
javax.el.PropertyNotFoundException: /paginas/compromisso/List2.xhtml @29,92 rendered="#{compromisso.pagingInfo.renderRemaing}": Property 'renderRemaing' not found on type br.com.mda.jsf.util.PagingInfo
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:104)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:416)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:280)...
Segue os fontes:
List2.xhtml (trecho que tá dando" pau")<h:commandLink action="#{compromisso.next}" value="Remaining #{compromisso.pagingInfo.itemCount - compromisso.pagingInfo.lastItem}"
rendered="#{compromisso.pagingInfo.renderRemaing}"/>
package br.com.mda.jsf.util;
public class PagingInfo {
private int batchSize = 5;
private int firstItem = 0;
private int itemCount = -1;
public int getBatchSize() {
return batchSize;
}
public int getItemCount() {
return itemCount;
}
public void setItemCount(int itemCount) {
this.itemCount = itemCount;
}
public boolean renderRemaing (){
if (getItemCount() > getLastItem() && getLastItem() + batchSize > getItemCount()){
return true;
}else{
return false;
}
}
public int getFirstItem() {
if (itemCount == -1) {
throw new IllegalStateException("itemCount must be set before invoking getFirstItem");
}
if (firstItem >= itemCount) {
if (itemCount == 0) {
firstItem = 0;
} else {
int zeroBasedItemCount = itemCount - 1;
double pageDouble = zeroBasedItemCount / batchSize;
int page = (int) Math.floor(pageDouble);
firstItem = page * batchSize;
}
}
return firstItem;
}
public void setFirstItem(int firstItem) {
this.firstItem = firstItem;
}
public int getLastItem() {
getFirstItem();
return firstItem + batchSize > itemCount ? itemCount : firstItem + batchSize;
}
public void nextPage() {
getFirstItem();
if (firstItem + batchSize < itemCount) {
firstItem += batchSize;
}
}
public void previousPage() {
getFirstItem();
firstItem -= batchSize;
if (firstItem < 0) {
firstItem = 0;
}
}
}
Grato por qualquer luz!
