• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

GraphicImage

GraphicImage is capable of presenting images that are created programmatically at runtime or images stored in a database.

GraphicImage Tag Documentation

GraphicImage extends the h:graphicImage component with the ability of displaying binary data like an inputstream. Main use cases of GraphicImage is to make displaying images stored in database or on-the-fly images easier. Legacy way to do this is to come up with a Servlet that does the streaming, GraphicImage does all the hard work without the need of a Servlet.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
alt String false
cache boolean false false Enables/Disables browser from caching the image.
dir String false Direction indication for text that does not inherit directionality.
height String false Specifies the height of an element.
ismap boolean false false
lang String false
library String false Library name of the image.
longdesc String false
name String false Name of the image.
onclick String false Fires when a mouse click on the element.
ondblclick String false Fires when a mouse double-click on the element.
onkeydown String false Fires when a user is pressing a key.
onkeypress String false Fires when a user presses a key.
onkeyup String false Fires when a user releases a key.
onmousedown String false Fires when a mouse button is pressed down on an element.
onmousemove String false Fires when the mouse pointer is moving while it is over an element.
onmouseout String false Fires when the mouse pointer moves out of an element.
onmouseover String false Fires when the mouse pointer moves onto an element.
onmouseup String false Fires when a mouse button is released over an element.
role String false
sizes String false One or more strings separated by commas, indicating a set of source sizes.
srcset String false One or more strings separated by commas, indicating possible image sources for the user agent to use.
stream boolean false true Defines if the image is streamed or rendered directly as data uri / base64 with ViewScoped support.
style String false Specifies an inline CSS style for an element.
styleClass String false Specifies one or more CSS class names for an element.
title String false Specifies extra information about an element (displayed as a tooltip).
usemap String false
value Object false Value of the component.
width String false Specifies the width of an element.
Loading...
Tag DocumentationNew DocumentationNew Documentation
Static Image
JFreeChart
JFreeChart rendered as DataURI / ViewScoped support
JFreeChart optimized without buffering
GraphicText

Usage


<div class="card">
    <h5>Static Image</h5>
    <p:graphicImage name="images/nature/nature4.jpg" library="demo"/>
</div>

<div class="card">
    <h5>JFreeChart</h5>
    <p:graphicImage value="#{graphicImageView.chart}"/>
    <p:graphicImage value="#{graphicImageView.chartAsByteArray}"/>
    <p:graphicImage value="#{graphicImageView.chartAsStream}"/>
</div>

<div class="card">
    <h5>JFreeChart rendered as DataURI / ViewScoped support</h5>
    <p:graphicImage value="#{graphicImageView.chart}" stream="false"/>
    <p:graphicImage value="#{graphicImageView.chartAsByteArray}" stream="false"/>
    <p:graphicImage value="#{graphicImageView.chartAsStream}" stream="false"/>
</div>

<div class="card">
    <h5>JFreeChart optimized without buffering</h5>
    <p:graphicImage value="#{graphicImageView.chartWithoutBuffering}"/>
    <p:graphicImage value="#{graphicImageView.chartWithoutBuffering}" stream="false"/>
</div>

<div class="card">
    <h5>GraphicText</h5>
    <p:graphicImage value="#{graphicImageView.graphicText}"/>
</div>