Ajax Action
a4j:ajax
a4j:commandButton
a4j:commandLink
a4j:actionListener
a4j:jsFunction
a4j:poll
a4j:push
a4j:param
Ajax Queue
a4j:queue
a4j:attachQueue
Ajax Output/Containers
a4j:outputPanel
a4j:status
a4j:region
a4j:mediaOutput
a4j:log
Validation
Client Side Validation
rich:graphValidator
rich:message
rich:messages
rich:notify
Data Iteration
a4j:repeat
rich:dataTable
rich:extendedDataTable
rich:collapsibleSubTable
rich:dataScroller
rich:list
rich:dataGrid
Trees
rich:tree
Tree Adaptors
Output/Panels
rich:chart
rich:panel
rich:togglePanel
rich:tabPanel
rich:collapsiblePanel
rich:accordion
rich:popupPanel
rich:progressBar
rich:tooltip
Menus
rich:panelMenu
rich:toolbar
rich:contextMenu
rich:dropDownMenu
Inputs
rich:autocomplete
rich:calendar
rich:editor
rich:inputNumberSlider
rich:inputNumberSpinner
rich:inplaceInput
rich:fileUpload
Selects
rich:inplaceSelect
rich:select
rich:orderingList
rich:pickList
Drag and Drop
Drag and Drop
Miscellaneous
Standard elements skinning
rich:placeholder
RichFaces functions
rich:focus
rich:componentControl
rich:hashParam
rich:hotKey
rich:jQuery

The a4j:mediaOutput component allows images, video, sounds, and other binary resources to be displayed as defined by a user on the fly.

The createContent attribute references the method that is used for creating content. The method accepts two parameters:

  • The OutputStream parameter is a reference to the stream that is used for output.
  • The second parameter is a reference to the value attribute of the component.

The value attribute references data that can be used as input data for the content creator method. The data should be serializable since it is encoded as the URL of the resource.

The mimeType attribute defines the type of output content. It is used to define the corresponding type in the header of an HTTP response.

The cacheable attribute is a flag that defines the caching strategy. If cacheable is set to false, the response will not be cached. If set to true, it will be cached and the serialized value of the value attribute is used as a cache key.

This example reads the existing image and re-indexes the palette using colors you selected below.

Color 1 Color 2 Color 3