No, with new HtmlDataTable() I do not get NPE. So what does it mean? 

Ps. My backing bean is session scoped.

PK

-----Original Message-----
From: Martin Marinschek [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 18, 2005 3:34 PM
To: MyFaces Discussion
Subject: Re: FacesException: Could not get property rows of component...

What happens if in your getJsfDataTable function you call new
HtmlDataTable() each time?

do you still get this NPE?

regards,

Martin

On 8/18/05, Kołoszko Paweł <[EMAIL PROTECTED]> wrote:
> One more thing. When binding="#{listRodzajePism.jsfDataTable}" is 
> removed from x:datatable tag, everyhing works just fine.
> 
> PK
> 
> -----Original Message-----
> From: Kołoszko Paweł
> Sent: Thursday, August 18, 2005 11:20 AM
> To: [email protected]
> Subject: 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(HtmlDataTa
> ble.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
> 


-- 

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

Reply via email to