Empty rows in Datatable [SOLVED]

UI Components for JSF
Post Reply
saprobionte
Posts: 80
Joined: 20 Jun 2011, 15:46

28 Jul 2011, 16:44

Hi,

I manage a datatable in my page, and I should become crazy because I don't see what's wrong :). I create my datatable :

Code: Select all

<p:dataTable id="seriestable" style="height:250px" var="serie" paginator="true" value="#{tableBean.series}">  
                            <p:column>  
                                <f:facet name="header">  
                                    <h:outputText value="Numéro Série" />  
                                    <h:outputText id="ID" value="#{serie.series_no}" />
                                </f:facet>  
                            </p:column>
</p:dataTable>
In my TableBean, I got a series value :

Code: Select all

private List<Serie> series = new ArrayList<Serie>();
I populate it correctly, and my class Serie contains a field series_no :

Code: Select all

public class Serie implements Serializable {   
    private String series_no;

    public String getSeries_no() {
        return series_no;
    }

    public void setSeries_no(String series_no) {
        this.series_no = series_no;
    }
So i "think" i could access this value ... But when I start my webpage, my datatable is correctly screened, with the correct rows numbers (depending on how many serie i put in my series list. But cells are empty, and when I debugged my project, I never go in the getSeries_no function. Do you see something wrong ?
Last edited by saprobionte on 29 Jul 2011, 09:40, edited 1 time in total.
PF 3.0RC1 , JSF 2.0, Tomcat 7, NetBeans 7.0

rdeoliveira
Posts: 61
Joined: 23 Jun 2011, 11:40

28 Jul 2011, 17:17

Hello,

Try by removing the _ on the getter / setter. Tell me if it works or not.
JSF 2.0
Primefaces 3.0.M3
Tomcat 7.0
--
French user of primefaces

saprobionte
Posts: 80
Joined: 20 Jun 2011, 15:46

28 Jul 2011, 17:23

I just try, nothing change. I also got another datatable with setter/getter containing _, and this one display correctly all datas.
PF 3.0RC1 , JSF 2.0, Tomcat 7, NetBeans 7.0

rdeoliveira
Posts: 61
Joined: 23 Jun 2011, 11:40

28 Jul 2011, 17:29

I know you put your

Code: Select all

<h:outputText id="ID" value="#{serie.series_no}" />
on the facet header

Try :

Code: Select all

<p:column> 
  <f:facet name="header"> 
    <h:outputText value="Numéro Série" /> 
  </f:facet> 
  <h:outputText id="ID" value="#{serie.series_no}" />
</p:column>
Now i'm sure it will work
JSF 2.0
Primefaces 3.0.M3
Tomcat 7.0
--
French user of primefaces

saprobionte
Posts: 80
Joined: 20 Jun 2011, 15:46

28 Jul 2011, 17:33

You're a genious ! Would you marry me ? :D

Thanks you very very much ^^
PF 3.0RC1 , JSF 2.0, Tomcat 7, NetBeans 7.0

rdeoliveira
Posts: 61
Joined: 23 Jun 2011, 11:40

28 Jul 2011, 17:35

Your welcome... and no thanks for the proposal :)

And don't forget to put a [SOLVED] on title :)
JSF 2.0
Primefaces 3.0.M3
Tomcat 7.0
--
French user of primefaces

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests