Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
render:satelliteblob
Retrieves a blob from a table or from the CS-Satellite cache.
Syntax
<render:satelliteblob service="HTMLtagName
" [blobtable="blobTable
"] [blobkey="primaryKeyName
"] [blobwhere="primaryKeyValue
"] [blobcol="column name
"] [c="asset type
"] [cid="asset id
"] [asset="asset instance name
"] [field="asset field name
"] [blobheader="MIMEtype
"] [cachecontrol="expirationDateAndTime
"] [csblobid="session variable value" /> [<render:argument name="argname
" value="argvalue
"/>] </render:satelliteblob>Parameters
service
(required)- Input. Start of the HTML tag to hold the reference to the blob. For example, if the blob is an image, use
service="IMG SRC"
.
blobtable
(optional)- Input. Name of the CS-Direct table that stores assets of this type. For example,
blobtable="ImageFile"
.
blobkey
(required, if blobtable set)- Input. Name of the column used as the primary key. Typically this is
id
.
blobwhere
(required, if blobtable set)- Input. Object ID of the asset.
blobcol
(required, if blobtable set)- Input. Name of the column that contains the binary data. For example, for the imagefile asset type,
blobcol="urlpicture"
.
field (required, if blobtable not set)
- Input. The name of an asset field containing binary data to be served.
asset (optional)
- Input. Name of an asset instance.
c (required, if asset and blobtable not set)
- Input. An asset type name.
cid (required, if asset and blobtable not set)
- Input. An asset identifier.
blobheader
(required)- Mimetype for returned data, in the form
description/extension
. For example, the mimetype for a GIF image isimage/gif
.
render:argument
(optional)- Input. Name/value modifiers for the HTML tag. For example:
<render:argument name="vspace" value="5"/>
<render:argument name="hspace" value="5"/>
- Special values to
render:argument
include:
blobheadernamen (optional)
- Specifies HTTP header variables to suit your needs, The
blobheadername
parameter is used in conjunction with theblobheadervalue
parameter to produce name/value pairs. This parameter represents the variable name.
blobheadervaluen (optional)
- Used in conjunction with
blobheadername
to specify and represent HTTP header variable values.
cachecontrol
(optional)- Input. Determines for how long to cache the blob. See satellite:blob for details about this parameter.
csblobid (optional)
- Value of this parameter must correspond to a session variable of the same name when BlobServer security is on. When a request is made to the BlobServer, the
img src
service parameter sends a new request to the application server after the browser reads the containing page. BlobServer then verifies if thecsblobid
parameter was set. When BlobServer security is set to true and thecsblobid
value matches the session variable value, the blob is served. If the values do not match, a security violation is reported and no blob is served.
Description
This tag is the CS-Direct equivalent of the CS-Satellite satellite:blob tag, with the following exception:
rendermode
is passed in automatically.You can use the
blobheadername
andblobheadervalue
parameters to specify http headers in the BlobServer response. For example, you can specify the content-type as follows:blobheadername1="Content-Type" blobheadervalue1="image/gif"If you want to use http headers to prevent browser caching of BlobServer requests for all browsers, use both HTTP 1.0 and HTTP 1.0 cache control directives. In the following example, the first header (Cache-Control:no-cache) is the HTTP 1.1 directive and the second header (Pragma:no-cache) is the HTTP 1.0 directive.
blobheadername1="Cache-Control" blobheadervalue1="no-cache" blobheadername2="Pragma" blobheadervalue2="no-cache"To determine how long to cache a page or pagelet, these criteria are evaluated in this order:
1. A value passed in using the
cachecontrol
parameter.
2. If there is no value in
cachecontrol
, the value in thesatellite.page.cachecontrol.default
property, found in thefuturetense.ini
property file, is used.
3. If there is no value in
satellite.page.cachecontrol.default
, the value of theexpiration
property, located in thesatellite.ini
property file, is used.We recommend that you set values for the
NOTE: The table name containing the blob, the primary key of the table, the id of the table row, and the column name that contains the binary data are all optional parameters. The same information can be provided to this tag by specifying an asset type, id and field name, or an asset instance object name and field name. However, there is an advantage to using the latter forms. If the owning asset is changed, Blob Server will invalidate the cached blob, but only if it was served via one of the asset forms of the render:getbloburl tag.satellite.page.cachecontrol.default
properties that make sense for the majority of your pages and pagelets. If you want to override the default expiration time, use thecachecontrol
parameter. Use the expiration property to determine the timeout for pages that are not generated from this tag; for example, pages that are generated directly from a URL.errno
None.
Examples
This code creates an HTML <
IMG SRC>
tag. TheSRC
is the blob in the ImageFile table identified through the ID passed in withblobwhere='<%=ics.GetVar("asset:id")%>'
and both its horizontal and vertical spacing are at five pixels:<render:satelliteblob blobtable="ImageFile" blobkey="id" blobcol="urlpicture" blobwhere='<%=ics.GetVar("asset:id")%>' blobheader='<%=ics.GetVar("asset:mimetype")%>' service="IMG SRC">
<render:argument name="alt" value='<%=ics.GetVar("asset:alttext")%>'/> <render:argument name="hspace" value="5"/> <render:argument name="vspace" value="5"/></render:satelliteblob>This code does the same, but the cached blob will be invalidated when the corresponding ImageFile asset is changed:
<render:satelliteblob c="ImageFile" field="urlpicture" cid='<%=ics.GetVar("asset:id")%>' blobheader='<%=ics.GetVar("asset:mimetype")%>' service="IMG SRC">
<render:argument name="alt" value='<%=ics.GetVar("asset:alttext")%>'/> <render:argument name="hspace" value="5"/> <render:argument name="vspace" value="5"/></render:satelliteblob>This code does the same, but uses an already-loaded ImageFile asset instead:
<asset:load name="myasset" type="ImageFile" objectid='<%=ics.GetVar("asset:id")%>'/> <render:satelliteblob asset="myasset" field="urlpicture" blobheader='<%=ics.GetVar("asset:mimetype")%>' service="IMG SRC">
<render:argument name="alt" value='<%=ics.GetVar("asset:alttext")%>'/> <render:argument name="hspace" value="5"/> <render:argument name="vspace" value="5"/></render:satelliteblob>See Also
Home > Contents > Index > ![]()
FatWire JSP Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.