Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

JSF don't load MySQL records into rich:extendedDataTable.

 
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a DAO class that don't load records of my MySQL table I don't receive any error. Below is my project.
DAO:

BEAN:

JSF:

I don't any idea to solve this problem.
Thanks and best regards.
 
Saloon Keeper
Posts: 23449
159
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Evaluates to:
Which is not valid SQL. That should have thrown an Exception and been reported on the server log.
 
Cezar Apulchro
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim, I have another DAO class that populate my rich  extendedDataTable without problem, both DAO that are identical the differences is bean and mysql table.
Another DAO that I have:

Thanks.
 
Tim Holloway
Saloon Keeper
Posts: 23449
159
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note the difference:

LstCidade is set to "SELECT MunicipioFROM Tabela_Cadastro_Municipios".

Compare to:

LstEspecialidade is set to "SELECT Especialidade FROM Tabela_Especialidades_Medica".

See the difference?
 
Cezar Apulchro
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, the problem still the same. The browser and log don't show any error for analyse.
 
Cezar Apulchro
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again, I change my JSF:

Table now are showing the content, I have 91 records in mysql table the clientRows say that the default is zero to load all records. I will work in this situation now.
 
Cezar Apulchro
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, the extendedDataTable are display only 26 records. If I change clientRows to 0 or remove clientRows nothing is shown. This is description of clientRows "Use to switch Extended Data Table to AJAX lazy-loading mode. Specify number of rows rows to be loaded with one request. If this attribute is set to "0", all rows are loaded. (Default value: 0)". How to populate the table with all records?
 
Tim Holloway
Saloon Keeper
Posts: 23449
159
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, go back and read the "future improvements" hints that I gave you at the end of your earlier problem: webpage You need to do these things, because using crude force like you are doing now will cost much in both performance and reliability in your table display.

Next, make sure that you know the distinction between the number of rows in the View (extendedDataTable) and the Model (tmunicipios bean). The view can show the entire contents of the table DataModel or it can show a subset (fixed number of rows).  Tne clientRows attribute of the extendedDataTable indicates the number of rows to display. The number of rows in the DataModel (tmunicipios.municipio) is simply the size of the List or array that holds those rows. The AJAX properties of the  extendedDataTable tag determine whether the rows can be fetched from within the DataModel without refreshing the entire webpage [iii]versus[/i] just fetching and updating the table view within the current page (without re-drawing everything else).

If you want all of the rows in the DataModel to display without scrolling or fetching, set clientRows to 0. Otherwise, the dataTable will only display as many rows out of the DataModel as you indicate. If there are fewer rows in the DataModel than the value of clientRows, the dataTable will only display what's available and either shorten the table display or pad it with filler.
 
Cezar Apulchro
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I said that when clientRows is set to 0 nothing is shown in extendedDataTable, clientRows is 0 as default. I you want all of the rows in the DataModel to display with scrolling.
 
Cezar Apulchro
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand you,  I made some change but  my priority is how to populate the extendeddatatable with all records of my mysql. The default of clientRows that is "0" don't work.
 
Cezar Apulchro
Ranch Hand
Posts: 302
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I changed to but the problem still the same.
 
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic