Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
asset:addmembers
This tag adds child assets to an asset that can contain child assets.
Syntax
<asset:addmembers
name="
assetName
"
list="
list of members
"
field="
meta attribute name
"/>
Parameters
name (required)
- Input. Name assigned the previously created or loaded asset.
list (required)
- Input. The list of member assets to add as children to the loaded asset. The list must contain the columns:
membertype
,memberid
, andordinal
. The ordinal number is temporary and merely represents the order within the passed-in list. It is the tag's responsibility to create reasonable ordinal values for the members.
field (required)
- Input. The asset's attribute name in which to store the member assets. Legal values include
Association-unnamed
andAssociation-named
.
Description
This tag adds members to an asset which can accept asset children. The changes will be written to the database on
asset:save
.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). -12007 The list did not have correct columns. -12070 Asset was not fully loaded. Tag requires ASSET.LOAD with editable flag to fully load asset.Example
Add an Article to a Collection as unnamed associations.
<asset:load name="aCollection" type="Collection" objectid='<%= ics.GetVar("id") %>'/> <listobject:create name="lo" columns="membertype,memberid,ordinal"/> <listobject:addrow name="lo"> <listobject:argument name="membertype" value="Article"/> <listobject:argument name="memberid" value='<%= ics.GetVar("articleId")%>'/> <listobject:argument name="ordinal" value='<%= ics.GetVar("counter")%>'/> </listobject:addrow> <listobject:tolist name="lo" listvarname="add2list"/> <asset:addmembers name="aCollection" field="Association-unnamed" list="add2list"/> <asset:save name="newasset"/>See Also
asset:load
asset:addchild
asset:changeref
asset:cantakeaction
asset:children
asset:childtypes
asset:removemembers
asset:reorder
asset:save
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.