You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Kołoszko Paweł <pa...@atena.pl> on 2005/08/18 11:20:09 UTC
FacesException: Could not get property rows of component...
MyFaces 1.0.9
I have a following problem:
I have page.jsp with datatable and a button:
<x:dataTable id="listarodzajepism" value="#{listRodzajePism.rodzajePism}"
var="rodzajPisma" border="0"
styleClass="standardTable"
headerClass="standardTable_SortHeader"
rowClasses="standardTable_Row1,standardTable_Row2"
footerClass="standardTable_Footer"
sortColumn="#{listRodzajePism.sort}"
sortAscending="#{listRodzajePism.ascending}"
preserveDataModel="true"
preserveSort="true"
rows="24"
binding="#{listRodzajePism.jsfDataTable}">
... column, column, column ...
</x:dataTable>
<h:commandButton id="cb" value="NewPage" action="newpage"/>
Action "newpage" of commandbutton opens page2.jsp with only one button:
<h:commandButton id="button"
value="Cancel"
action="back"
immediate="true"/>
Action "back" goes back to page.jsp. And here the problem occurs becuase I
receive an error:
javax.faces.FacesException: Could not get property rows of component
rodzajepismview:listarodzajepism
Caused by: java.lang.NullPointerException
at
org.apache.myfaces.component.html.ext.HtmlDataTable.getRows(HtmlDataTable.ja
va:547)
When I open page.jsp everything is OK, but action page.jsp -> page2.jsp ->
page.jsp
Cause an error.
In my backing bean I have:
private HtmlDataTable jsfDataTable;
public HtmlDataTable getJsfDataTable() {
return jsfDataTable;
}
public void setJsfDataTable(HtmlDataTable jsfDataTable) {
this.jsfDataTable = jsfDataTable;
}
What can cause this problem? Is it a bug in MyFaces or my fault somewher in
my code?
PK