Displaying a list like a p:selectOneMenu in a page wise manner - jsf

I'm trying to manage a <p:selectOneMenu> drop-down to show a list of 12000 records; I'm searching for a smart component within "paginate" my results and dynamic load on scrolling.
Can someone help me?
I'm using Primefaces 3.5
Thanks
Davide

Related

Primefaces lazy loading datatable and filter form outside of table

As said in the title. Is it possible to do this?
I would like to have for instance filter form in dialog, and displayed it on demand.
I suppose it would be possible with filteredValue option, but as i understand that is not used with lazy loading.
I would appreciate any advice.

jsf popupwindow with a datatable

I have a form which one of it's fields is a code and description, also a button for opening a popup window that contains a list of all of the available codes.
when the user double clickes a row from that table i want to set these values to the code and description. - how can this be done?
Another question, I want to create this popup and table to be initialized dynamically - by that i mean that if i have a few forms in my application, when ever i have a field which has a description i want to be able to open this popup and to see the available list for that field. (every field can be from a diffrent table). is it possible to create something like that? if so, how?
Any help will be appritiated,
Thank's In Advance.
Yes, it is possible. Even more, many component libraries have ready to use popup/dialog components, such as RichFaces with <rich:popupPanel> and PrimeFaces with <p:dialog>.
If you do not want to use a component library for some reason, you would need to create a custom component for this which generates basically an absolutely positioned HTML <div> element with a CSS overlay which get shown/hidden by JS on a particular click/action. The HTML/CSS/JS part should be relatively simple if you are familiar with those languages. The JSF part is somewhat hard if you have never created a custom component before, but it should be possible with a composite component as well, so you could also just create one with pure XHTML. The updating/refreshing can just take place by the usual <f:ajax> means.

Is there a JSF component that supports autocomplete and can hold multiple values?

I'm developing an application in JSF 2.0.
I was wondering if there is a JSF component that supports an autocomplete function and that can hold multiple values (that binds to an array or a list). I don't have the time and knowledge to create such a component myself.
I know PrimeFaces has got the p:autoComplete (http://www.primefaces.org/showcase-labs/ui/autoCompletePojo.jsf) component, but it can only 'hold' one value. I'd need a component that can do what p:auotoComplete does, but multiple times; the textarea should be able to display multiple values. Is there a library that contains such a component?
Any help would be greatly appreciated.
The latest PrimeFaces snapshot 3.1 got AutoComplete - Multiple Selection
You can get it from here
3.1-SNAPSHOT
You might see this Richfaces example. I think that tokens and autoFill = "false" will work.

Help needed to create a Search page using JSF, EJB, JPA & Primefaces with Pagination

I am trying to make a search page using JSF, EJB, JPA & Primefaces with Pagination from an Oracle database table.
The page has two regions (1) region for entering search parameters
(2) region with a datatable showing the search result. This datatable supports pagination.
I have used standard code generated using Netbeans IDE, but dont know how to pass the parameters while clicking the search button and show the results based on the search in the datatable.
Please help me with sample code.
Thanks in advance.
For the input, just use a normal form like as you've created in a hello world tutorial. For presentation and pagination of the results, use PrimeFaces LazyDataModel. See also their showcase example.

Make editable rows in Datatable

I have list of rows displayed on the screen. These rows are iterated using the JSF datatable component. Now my requirement is to edit any particular row which user clicked.
Is there any way to make the fields editable while user clicking the row. Then user will fill the details and save it.
Any suggestions would be appreciated.
Creating editable data tables is very easy with jsf. Here is a good tutorial on this. But "making it editable when user clicks on it" is not supported out of the box. And this is where JSF shines, you just need to find for a JSF component (open source or commercial) compatible with your JSF (1.x or 2.x) version and start using it.
My first suggestion for you is to check and see if PrimeFaces provides this kind of component. Here is the component you are looking for.

Resources