How can I implement a custom column filter in icefaces using something like a checkbox? - jsf

I'm currently using "filterBy" for filtering via inputText components and its working very well. I'd like to be able to filter one of my columns with the selectBooleanCheckbox component.
It looks like this can be done in primefaces:
Custom filters and converters in p:dataTable
But I'm not quite sure how to do it in icefaces (if at all possible)

According to an ICEfaces developer himself, this is not possible.
http://www.icesoft.org/JForum/posts/list/0/22736.page
As explained in the link, you can use the "filterOptions" attribute to use a h:selectOneMenu with selectItems as a filter, which works for me.

Related

Primefaces fetch dropdown values on show

I have a strange situation where one needs to dynamically populate dropdown values. The best idea I have come up with is creating a button, which triggers ajax request that fetches new dropdown values and on complete updates the dropdown and displays it.
I was wondering if there is any other more elegant way of handling situations like this. I am using the latest primefaces version 11.0.0.
I suggest to use the p:autoComplete component with the dropdown attribute set to true instead. It allows you to get the values when the button is clicked or when a query is typed. You don't need to take care of updating the component yourself. The only thing you need to do is have a completeMethod in your bean or have a completeEndpoint (REST endpoint).
With PrimeFaces 12 you can even (re)use a LazyDataModel as a suggestions provider.

JSF: ordered list and inplace editing

We are using JSF and I was looking for a component to implement a list that:
can be re-ordered (buttons/drag and drop/whatever)
elements can be added and deleted
elements can be edited
To be more explicit something like PrimeFaces OrderList where elements can be edited. inplace editing would be nice but not a requirement. Before implementing something that already exists I wanted to ask if I missed something and the component already exists.
You could take a look at Richfaces and IceFaces in addition to PrimeFaces. They all provide advanced components that might offer almost all the features you need.

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.

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.

use Label and Value of f:selecteItems with rich:combobox

How can i display Label from SelecteItem and use the value as a Key in rich:combobox? Jboss forums says it is not possible since the rich:combobox is designed for suggestion. Not really a replacement for h:selectOneMenu . is there any work around or alternative way?
PS: i tried using JSF converter it is modifying both value and label.
no.
use selectOneMenu.
add a4j:support as a child if you want ajax.

Resources