JBoss Community

View post: Using rich:colorPicker in RichFaces

Using rich:colorPicker in RichFaces

Posted on 2009-07-01 20:06:19.0 by max [ View original post ]

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:

<h:outputText id="text" value="RichFaces is cool!" 
   style="font-size: x-large; color: #{colorBean.color}"/>
<h:form>
   <rich:colorPicker value="#{colorBean.color}">
      <a4j:support event="onchange" reRender="text"/>
   </rich:colorPicker>
</h:form>

Initial rendering and opening the picker:
screenshot71

After color selection:
screenshot72


Post to DZone   Post to del.icio.us   Digg this!   Stumble It!