Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
searchstate:addhasancestorconstraint
Adds an ancestor constraint into an existing searchstate object.
Syntax
<searchstate:addhasancestorconstraint name="ssname" assetid="id" assettype="assettype" bucket="bucketname" [immediateonly="true|false"]/>Parameters
name
(required)- Input parameter. Name of an object representing a searchstate.
assetid
(required)- Input parameter. Asset id of the ancestor asset whose descendant asset is to be searched.
assettype
(required)- Input parameter. Asset type of ancestor asset.
bucket
(required)- Input parameter. Bucket name. This parameter needs to be unique across searchstates.
immediateonly
(optional)- Input parameter. Boolean value to indicate immediate ancestors or all ancestors. When the value is
false
, searchstate is set to search for all the ancestors. When the value istrue
, (default value) searchstate is set to search for immediate ancestors only.Description
The
searchstate
object referred to byname
is updated to include the new constraint specified by this tag. It adds a search constraint to find assets that have a particular asset of typeassettype
and idassetid
as its ancestor.Example
This code creates an empty
searchstate
and adds an ancestor constraint. Any assets that have 'FSII Superior Systems Inc.' as their ancestor asset will be returned as matches for this constraint. This code then sets thissearchstate
into anassetset:setsearchedassets
tag to constrain theassetset
to be used when searching with other assetset tags.<asset:load name="prodParent" type="Product_P" field='name' value='FSII Superior Systems Inc.' /> <asset:get name="prodParent" field="id" output="assetid"/> <searchstate:create name="mainSS" op="and"/> <searchstate:addhasancestorconstraint name="mainSS" assetid='<%=ics.GetVar("assetid") %>' assettype="Product_P" bucket="ss2" /> <assetset:setsearchedassets name="as" constraint="mainSS" assettypes="Product_C"/> <assetset:getattributevalues name="as" attribute="FSIIProductName" listvarname="resultlist" typename="Product_A"/> <ics:listloop listname="resultlist"> <ics:listget listname="resultlist" fieldname="value"/><br/> </ics:listloop>See Also
searchstate:addhasdescendantconstraint
searchstate:create
assetset:setsearchedassets
assetset:getattributevalues
ListObjects
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.