Using rich:colorPicker in RichFaces

One of the new components in RichFaces 3.3.1 is rich:colorPicker. The component is based on jQuery widget and has the same functionality and events. Using the component is straight forward. Here is an example.

JSF page:


Initial rendering and opening the picker:

After color selection:


  1. Salem Gassara says:

    Thanks for this article, it help me to use the component rich:colorPicker at the firls time.

    But when I try to use this component in a dataTable hi doesn’t work, tha value of color attributes in my bean is null. (color is a String value )

    I try to remove but the same problem color value is null.

    Are you try to put rich:colorPicker worck in DataTable ??
    thare ara any solution ???

    Many thanks for you.

  2. max says:

    Sorry, haven’t tried with data table yet.

  3. Salem Gassara says:

    Many Thnaks for your replay Max,
    If you will try it with data table, please put the solution in you blog,

    Thanks for you.


  4. Salem Gassara says:


    j’ai trouvé une solution pour ce problème : l’affichage d’un dans un dataTable.
    l’idée est simple, il suffit d’utiliser une HashMap qui porte comme clé l’id de l’objet dans le dataTable et comme valeur le couleur.
    Et dans le xhtml :

    C’est facile,… 🙂

  5. Salem Gassara says:

    Sorry, I posted in Frensh.

    I found a solution for this problem: the display of a dataTable.
    the idea is simple, just use a HashMap which is key as the id of the object in the dataTable and value as the color.

    and in the xhtml:

    item–> the item of dataTable.

    it’s easy 🙂

Leave a Comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.