class %ZEN.Component.image
extends control
Simple image control.
This can be used to display an image within a page or it can
serve as a button by specifying an onclick event.
There is no submitted value associated with this control.
There are several different ways to specify the image to display:
- If provided, src is the URI of the image to display.
- If provided, streamId is the OID value for a binary stream object containing the image.
This OID value will be encrypted and the image will be served via the CSP stream server.
- If provided, value is an encrypted stream OID value for a binary stream object containing the image.
The image will be served via the CSP stream server. This is used when the
image is bound to a property within a dataController that contains binary stream data.
Note that the
controlClass does not apply to the image component.
property alt
as %ZEN.Datatype.caption;
Alternate text for this image; This is used for the alt attribute
of the HTML img element used for this component.
property src
as %ZEN.Datatype.uri;
URI of image to display.
property srcDisabled
as %ZEN.Datatype.uri;
If defined, URI of image to display when this image is disabled.
property srcMissing
as %ZEN.Datatype.uri;
If defined, URI of image to display when a value for this image is missing;
This is used when this image is bound to a property of a dataController and
there is no value for the bound property.
property streamId
as %ZEN.Datatype.string(ZENENCRYPT=1);
If defined, this is the stream id of a binary stream object on the server
that will provide data for this image. This supercedes src
if present.
property text
as %ZEN.Datatype.string;
If defined, this is an optional text value associated with this image.
By default, this is used as a value when this image is the source of
a drag and drop operation.
method %DrawHTML()
Static HTML display method: draw the BODY of this component
as HTML.
Subclasses implement this in order to render the static HTML
contents of a component.
method %SetDefaultValues()
This method fills in reasonable default values for
this control. Used by tools (such as the Control Tester) to
dynamically create controls.
method getDragData(dragData)
[ Language = javascript ]
Override default drag behavior.
method imageClick(evt)
[ Language = javascript ]
User click on image; Invoke callback if button is enabled.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.