Home > Contents > Index >
asset:save
Saves an asset to the database.
Syntax
<asset:save name="asset instance object" [flush="true|false"] />Parameters
name (required)
- Name of the asset instance object.
flush (optional)
- If set to
true
, flushes the asset from the object pool.
Description
This tag saves an asset to its storage and updates the AssetPublication table. Associations defined by using the asset:addchild, asset:removechildren, asset:childgather, asset:addmembers tags are also saved there.
The following fields in the asset are updated by default:
status
- If no value is supplied, the status is m_sStatusCreated ('PL').
createdby
- If no value is supplied and this is a new asset. Set to the current user's displayable name.
createddate
- If no value is supplied and this is a new asset, set to the current date.
updatedby
- Set to the current user's displayable name.
createddate
- Set to the current date.If it is a new asset being saved or an asset loaded with editable="true" set, the AssetPublication table may be updated. It is updated to reflect the site affinity set in the loaded asset through using the asset:addsite, asset:removesite or asset:gather tags. If site affinity is set in no other way the save code will look in either of these variables:
primarypubid
(variable) - An entry is made based on the variableprimarypubid
.
pubid
(session variable) - Ifprimarypubid
does not exist, the session variablepubid
defines the publication in which to put the asset.Error Numbers
The possible values of
errno
include:
Value Description -105 Database error. -10004 A required parameter is missing. -10005 The requested object is not in the object pool (is not loaded into memory). -12018 Missing publication. -12034 Publish in progress. -12065 Error updating AssetPublication. -12070 Asset not fully loaded. Must used "editable" option when loading the asset.Example
This code loads an article and adds to its existing sites a site specified in the variable pubid and saves the article to the database :
<asset:load name="anArticle" type="Article" objectid='<%=ics.GetVar("id")%>' editable="true" /> <asset:addsite name="anArticle" pubid='<%=ics.GetVar("pubid")%>'/> <asset:save name="anArticle" />See Also
asset:addchild
asset:addmembers
asset:addsite
asset:canedit
asset:childgather
asset:create
asset:gather
asset:load
asset:removechildren
asset:removesite
asset:saveall
asset:set
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.