Class ecm.widget.ItemPreviewPane
Extends
dijit._Widget, ecm.LoggerMixin.
Provides a widget that displays a preview of the content for an item.
Defined in: <ecm\widget\ItemPreviewPane.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Method Attributes | Method Name and Description |
---|---|
<static> |
ecm.widget.ItemPreviewPane.ItemPreviewPane.addCustomThumbnailGenerator(itemPreviewThumbnailFunc)
This static method allows the
ItemPreviewPane to use a custom thumbnail generator function. |
<static> |
ecm.widget.ItemPreviewPane.ItemPreviewPane.setThumbnailGenerator(thumbnailGeneratorFunc)
This static method allows the
ItemPreviewPane to use a custom thumbnail generator function. |
setItem(item)
|
Method Detail
<static> ecm.widget.ItemPreviewPane.ItemPreviewPane.addCustomThumbnailGenerator(itemPreviewThumbnailFunc)
This static method allows the
ItemPreviewPane
to use a custom thumbnail generator function. The
custom thumbnail function will receive a handle to the ecm.model.ContentItem object containing the
content. The thumbnail function should return a base64 encoded version of the image content that can be set as
the "src" attribute on an HTML image tag. For example, todo: add example here. If the custom function does not
support a particular item or the repository associated with the item it should return null. Returning null will
cause the ItemPreviewPane to use IBM Content Navigator's default thumbnail generator instead.
- Parameters:
- itemPreviewThumbnailFunc
- The function to call to retrieve or generate a thumbnail.
- Deprecated:
- Use ItemPreviewPane.setThumbnailGenerator
- Since:
- 2.0.3
<static> ecm.widget.ItemPreviewPane.ItemPreviewPane.setThumbnailGenerator(thumbnailGeneratorFunc)
This static method allows the
ItemPreviewPane
to use a custom thumbnail generator function. The
custom thumbnail function will receive three parameters:
- item - An instance of ecm.model.ContentItem, containing the content.
- successCallback - A callback function to call, with a single parameter, containing the base64 encoded version of the image content for the thumbnail.
- failedCallback - A callback function to call, with no parameters, when the thumbnail could not be retrieved or generated.
- An instance of ecm.model.Request for the Request that was issued to generate the thumbnail.
- A value of (boolean) true, indicating that the function processed the image request in some way that did not require generating an instance of ecm.model.Request, and will call one of the callbacks.
- A value of null, indicating that the function is not going to process the image request, and that the default thumbnail generating should be used
- Parameters:
- thumbnailGeneratorFunc
- The function to call to retrieve or generate a thumbnail.
- Since:
- 2.0.3.7
onCompleteRendering()
postCreate()
setItem(item)
- Parameters:
- item