Home > Contents > Index >
Template Tags TOC   |    Alpha TOC   |    Tag Family TOC   |    Purpose TOC   |    Annotated TOC   |    Index 

 

render:callelement

Invokes an element defined in the ElementCatalog table.

Syntax

<render:callelement
        elementname="nameOfElement"
        [args="variable1,variable2,..."]
        [scoped="scope value"]>

   [<render:argument name="variable3" value="value3"/>]

</render:callelement>

Attributes

elementname (required)
Input. Name of the element to invoke.
args (optional)
A comma-separated list of Sites variables to be passed as arguments
scoped (optional)
Input. Manner in which variables in the calling element are available to the called element, and vice versa. Legal values are local, stacked, global. The default value is local. The following describes the behaviour of the various values:
Variable scoping
Value Description
global

In global scoping, both the calling element and the called element share the same variable pool. As such, all variables present in the caller will be available in the called element, and any changes made to variables in the called element will be visible in the caller afterwards. Argument tags will create new variables in the called element, and they will be available in the caller afterwards.

Global scope is ideal for calling a utility element to set variables for the caller.

local

In local scoping, the calling element and the called element have independent variable pools. No variables from the caller will be visible to the called element. Argument tags will create new variables in the called element, and they will not be available in the caller afterwards.

Local scope is ideal for calling an element to generate markup.

stacked

In stacked scoping, the calling element and the called element have independent variable pools, but some variables will be copied to the caller after execution of the called element. No variables of the caller will be visible to the called element. Argument tags will create new variables in the called element, and the final values of these variables after execution of the called element will be copied to the caller, overwriting any pre-existing values that may have existed.

Stacked scoping is a hyrid between global and local scoping. It should be considered an advanced value as global and local will probably be acceptable in most cases.

Parameters

render:argument (optional)
Nested parameter tag. The render:callelement tag allows arbitrary argument tags to be added in order to pass name/value pairs to the called element.

Description

This tag is equivalent to the ics:callelement tag with the following differences:

This tag should be used whenever the invoked element is rendering markup by calling other tags in the render tag library (this ensures proper propagation of system variables, such as rendermode, which are required for pages to render properly in different contexts). In this case, this tag is preferred over the ics:callelement tag because it is aware of special variables (rendermode and eid) that Sites elements require. It also offers advanced variable scope handling using the scoped attribute.

Note 1: If any list objects were created by listobject:create within the invoked element, the objects will remain available to the element using render:callelement even after the completion of the invoked element.

Note 2: There was a bug that the caller variables were available in the callee when the scope is local. This has been fixed in version 11gR1. To go back to the previous behavior add -DuseLegacyLocalScoping=true to JVM parameter.

Error Numbers

The possible values of errno include:

Value
Description
-10
The element does not exist.
-12
The element cannot be evaluated.

Examples

The following code sample calls the element named avisports/navbar.

<render:callelement elementname="avisports/navbar"/>

In order to pass extra arguments to the called element, the following syntax can be used:

<render:callelement elementname="avisports/navbar">
    <render:argument name="argumentName1" value="argumentValue1"/>
    <render:argument name="argumentName2" value="argumentValue2"/>
</render:callelement>

or, if the arguments are already present as variables in the ICS scope:

<render:callelement elementname="avisports/navbar" args="variable1,variable2"/>

which is a shortcut for:

<render:callelement elementname="avisports/navbar">
    <render:argument name="variable1" value='<%=ics.GetVar("variable1")%>'/>
    <render:argument name="variable2" value='<%=ics.GetVar("variable2")%>'/>
</render:callelement>

See Also

render:calltemplate

render:contentserver

  Home > Contents > Index >

Oracle JSP Tag Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.