Home > Contents > Index >
asset:scatter
Retrieves and makes variables of ("scatters") the values from all the fields of a loaded asset object. (To obtain just one field value, use asset:get.)
Syntax
<asset:scatter name="assetName
" [prefix="variablePrefix
"] [fieldlist="fieldsToScatter
"] [exclude="true|false
"]/>Parameters
name
(required)- Input. Name assigned to the asset whose fields you want to make variables of (scatter). This asset must be loaded and assigned a name before you can pass its name to this tag. (See
asset:load .)
prefix
(optional)- Input. Optional but rarely omitted. Specifies a string to be included in the name of the variables that store the asset's information. When you specify a prefix, you then create your variables by using a colon to separate the prefix from the field name. For example, if you specify prefix="article", your variables are
article:
fieldname
.
fieldlist
(optional)- Input. A comma separated list of fields to scatter (or not to scatter if excude field is set to true). If omitted, and exclude is not true, the fields of the primary asset table will be scatterd. If omitted, and exclude is set to true, all fields of the asset will be scattered.
The following key words can be used to represent groups of attributes:
LocalFields
- All the fields of the asset's primary table.Association-named
- Assets associated with the asset via named associations in the AssetRelationTree. Each named association will generate the scattered variables 'prefix:Association-named:nameOfAssociation_type
and 'prefix:Association-named:nameOfAssociation
'.Association-unnamed
- Assets associated with the asset via unnamed (ranked) associations in the AssetRelationTree. The number of unnamed associations is scattered to a variable, 'prefix:Association-unnamed:Total
'. Each unnamed association will generate the scattered variables 'prefix:Association-unnamed:n:rank
', 'prefix:Association-unnamed:n:ref_type
', and 'prefix:Association-unnamed:n:ref
', where n is an incrementing number starting at 0.Publist
- The asset's site affinity information from the AssetPublication table. The number of sites is scattered to a variable, 'prefix:Publist:Total
'. Each entry is scattered to a variable, 'prefix:Publist:n
', where n is an incrementing number starting at 0.*
- All fields.
exclude
(optional)Input. If set to true, specifies that all but those fields specified in the fieldlist
argument should be scattered. By default, exclude is false.
Description
This tag retrieves values from the fields of a previously loaded asset and then writes them into memory (session information) as variables. The variables are constructed with the prefix that you supply with the
prefix
parameter. After you use this tag, you can display the information contained in the asset's fields.Use this tag rather than multiple asset:get commands when you want to retrieve more than a couple of fields.
Error Numbers
The possible values of
errno
include:
Value Description -10004 A required parameter is missing. -10005 The requested object is not in the object pool (is not loaded into memory).Example
This code retrieves values from a loaded asset named
Article1
, writes variables for those values into memory, and then displays the data in the asset'sdescription
andabstract
fields:<asset:scatter name="Article1" prefix="article"/> <ics:getvar name="article:description"/> <ics:getvar name="article:abstract"/>See Also
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.