• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Rich component library does not contain the scrollableDataTable component

 
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have installed RichFaces and I initiating the use of this frameworks with creation of tables but some tags of the richfaces doesn't appear for me, for example trying to use scrollable DataTable I am receiving The http://richfaces.org/rich component library does not contain the scrollableDataTable component, this and others component.
Thanks in advance.
 
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That library has been EOL for years; are you sure you want to spend time learning it?
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't understand, my problem is to make a scroll in a datatable to do this I'm studying something articles in web this is one https://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_scrollableDataTable.html. Then the question is how to make jsf datatable scroll.
 
Saloon Keeper
Posts: 27807
196
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
I already told you. RichFaces 3 will not work properly on modern web browsers. You need RichFaces 4.5.

RichFaces 4.5 does not have a scrollableDataTable control. They moved those features into other dataTable controls.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, when I opened this contact I had already installed the RichFaces 4.5.17 and tried <rich:extendedDataTable but without success. I'm now trying again with extendedDataTable with the same problem of scroll. I'm using as the example of the link "http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=extendedDataTable&sample=simpleTable&skin=blueSky" where said that the scroll will occurs by height and width but this don't occurs for me.
My jsf:

Thanks.
 
Tim Holloway
Saloon Keeper
Posts: 27807
196
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
You will probably have less trouble if you don't use the ui:composition tag and simply lay out a standard JSF View Template page. I have serious doubts that what you're doing there includes all necessary page context information.

I will guess that what you're referring to when you say "the scroll will occurs by height and width " is related to whether or not a scrollbar appears. Scrollbars will only be displayed if the data requires more display space than can fit in the table view.

Since your table sample has only one column, I would not expect it to have a horizontal scrollbar. Whether it has a vertical scrollbar would depend on how many rows of data your gtabela.municipio collection has.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just want vertical scroll the quantity of records in my mysql database is more high that my extendedDataTable attribute high definition.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, trying to scroll I created an css file but I'm receiving the error of Unable to find resource /css/estilocss.css.
My css:

My jsf to test:

 
Tim Holloway
Saloon Keeper
Posts: 27807
196
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
JSF Version 2 has a sophisticated resource resolution subsystem. It facilitates things like "skinning" and I18N. A good write-up on its details can be found here:
https://mkyong.com/jsf2/resources-library-in-jsf-2-0/

Basically, the outputStyleSheet tag does not emit a direct HREF to the stylesheet the way that non-JSF webapps do, it emits a JSF URL and lets the FacesServlet locate the appropriate version of the resource.

But, simply put, since you're presumably not interested in the advanced capabilities, I think that this is probably what you need:



Note that I removed the "css" directory reference. A StyleSheet is presumed to be css, and thus looked for by the FacesServlet in the "css" directory.

Also, don't forget to place your file in /WEB-INF/resources/css, not in /css!
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I managed to create extendedDataTable with scroll. Below is the solution.

The set above work fine with <rich:dataTable> and <h:dataTable> too.
I have another set that work only with <h:dataTable> I can't see where are the problem to use <rich:extendedDataTable>.

Thanks.
 
Tim Holloway
Saloon Keeper
Posts: 27807
196
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
Many congratulations on getting things to work! It has been a struggle for you I know, and you deserve a cow for it.

I'm not sure exactly what you mean by "I have another set that work only with <h:dataTable> I can't see where are the problem to use <rich:extendedDataTable>", but if you can do what you want, that's a good start. You can learn from there.

A couple of hints for future improvements:

First, instead of SessionScoped on the backing bean, consider ViewScoped. View scope is much like Session scope, except that when you move to a different View, the ViewScoped Bean is automatically deleted. Session Scoped beans remain forever (or until the Seesion is destroyed), so this can make your app more resource-efficient.

Secondly, instead of instantiating an object to get the JDBC Connection form, you might want to provide an Application Scoped object that returns a Connection. When that object is initially instantiated, it can do a JNDI lookup to find the database Connection Pool and cache it in the Application Scope bean. Note that Application Scope is not thread-safe, so the logic for doing the JNDI should ideally be synchronized.

Also, instead of doing a SELECT every time that getEspecialidade() is invoked, keep a member property with the selected data List in your backing bean and only do the SELECT if that property is null. That will cache the data values. This is important because A), the getEspecialidade() method may get called 5 or 6 times every time the page is rendered, which is a LOT of database overhead, and B) if the items you are retrieving are likely to have had inserts, deletes or updates done by other users/threads, the same list won't get used to build the display and results may be unpredictable. If you keep a data cache like this in your bean, you'll have code that's more reliable and more efficient and if the data goes stale, just set the list reference to null to let the getEspecialidade() method know that it has to go back to the database and SELECT out a new List.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I say is why extendedDataTable don't work for Municipios.
Thanks.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The scroll was resolved then I will close this contact.
Thanks and best regards.
 
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic