Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
asset:canedit
Checks whether a publish operation, which prevents the specified asset from being edited, is in progress.
Syntax
<asset:canedit name="asset name" /> [type="asset type"] [objectid="asset id"]Parameters
name (required unless type and objectid supplied)
- Name of previously loaded asset.
type (required if name is not used)
- Input. Asset type of the asset. Either
type+objectid
or name must be supplied to identify the asset.
objectid (required if name is not used)
- Input. Asset id of the asset. Either
type+objectid
or name must be supplied to identify the asset.
Description
The
asset:canedit
tag checks the PubSession table for any running (status='R") publish operations. If the specified asset is approved for publishing in the target for any of those running publish sessions, the asset cannot be edited.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 intomemory). -12034 Publish in progress.Example
This example checks whether an asset can be edited and displays an error if the asset cannot be edited.
<asset:load name="myArticle" type="Article" objectid="123456789012" option="editable"/> <asset:canedit name="myArticle"/> <ics:if condition='<%=ics.GetErrno()<0%>' > <ics:then> Cannot edit asset. Error <ics:geterrno/>. </ics:then> </ics:if>This example does the same check without loading the asset.
<asset:canedit type="Article" objectid="123456789012"/> <ics:if condition='<%=ics.GetErrno()<0%>' > <ics:then> Cannot edit asset. Error <ics:geterrno/>. </ics:then> </ics:if>See Also
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.