crm:image

Overview

The <crm:image> tag is used to display an image on the page.

If only one image exists on the page then you can use the default values.

If multiple image components exist on the page then it is necessary to:

  • Create for each image a string property for the image name.
  • Handle image uploads overriding handleUploadImage method.
  • Load and save each image on viewRecord and saveRecord respectively (using DataEntryView implemented methods loadImage and saveImage  respectively). 

Attributes

NameRequiredTypeDefaultDescription

columnClasses

falseStringui-grid-col-12

Comma separated list of column style classes of the gird layout that will be used to display the component.

Column style class should be prefixed with ui-grid-col- and suffixed with the number of columns that content will take (out of 12).

For example, for two columns with the same size the columnClasses should be "ui-grid-col-6,ui-grid-col-6".

columnsfalseInteger1

Number of columns of the gird layout that will be used to display the component.

emptyIconfalseStringfa fa-file-image-o fa-4xIcon of the empty image as a css class.
groupNametrueStringnull

A name that should uniquely identify the image.

idtrueStringnullUnique identifier of the component.
imageNametrueStringThe image name that is defined on the managed bean.Name of the image.

managedBean

trueStringnullThe name of the Java managed bean class that will be used for retrieving the component values.
modefalseStringThe mode of the managed bean.

The mode of the component. 

Allowed values are VIEW and EDIT.

refreshfalseStringformComponent(s) to update with ajax.
removeImageMethodfalseStringremoveImageThe name of the client side callback to execute when image is removed.
visiblefalseBooleantrue

Controls the visibility of the component.


Getting Started 

The following example shows an image component.