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
Name | Required | Type | Default | Description |
---|---|---|---|---|
columnClasses | false | String | ui-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". |
columns | false | Integer | 1 | Number of columns of the gird layout that will be used to display the component. |
emptyIcon | false | String | fa fa-file-image-o fa-4x | Icon of the empty image as a css class. |
groupName | true | String | null | A name that should uniquely identify the image. |
id | true | String | null | Unique identifier of the component. |
imageName | true | String | The image name that is defined on the managed bean. | Name of the image. |
managedBean | true | String | null | The name of the Java managed bean class that will be used for retrieving the component values. |
mode | false | String | The mode of the managed bean. | The mode of the component. Allowed values are VIEW and EDIT. |
refresh | false | String | form | Component(s) to update with ajax. |
removeImageMethod | false | String | removeImage | The name of the client side callback to execute when image is removed. |
visible | false | Boolean | true | Controls the visibility of the component. |
Getting Started
The following example shows an image component.