Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse JET Guide
Previous Page Home Next Page

<c:include>

Standard JET2 Control Tags

include

Process the referenced template, and include its results in the output of the current template.

The attribute 'passVariables' allows explicit declaration of the variables that are passed to the template. By default, all context variables are available to the template. With this parameter, only those variables specified are available. In addition, any changes to passed variables in the template are not reflected in the invoking context.

The deprecated 'restoreNames' attribute is useful in recursive transformations. It causes the tag to save the listed variable values prior to executing the template, and then restore them after exectuion.

The 'restoreNames' and 'passVariables' options are mutually exclusive.


Tag Summary
required <c:include template="value"/>
full tag <c:include template="value" restoreNames="value" passVariables="value" super="value"/>

Required Attributes
template
A transformation project relative path to the template to execute.

Optional Attributes
restoreNames
A comma separated list of variable names (without the $ sign). Mutually exclusive with 'passVariables'.
passVariables
A comma separated list of variable names (without the $ sign). Mutually exclusive with 'restoreNames'.
super
If set to 'true', the template loader attempts to load directly from the overriden transformation (as specified by the 'override' tag or by the 'overrides' attribute of the 'transform' element of the 'org.eclipse.jet.transform' extension in the transforms plugin.xml). If no 'super' template can be found, an error occurs. The default is 'false', indicating normal template loading.

Example
<c:include template="templates/myInclude.jet"/>

<%-- include myInclude.jet from overriden transformation--%>
<c:include template="templates/myInclude.jet" super="true"/>

<%-- pass only the variables $foo and $bar to myInclude.jet--%>
<c:include template="templates/myInclude.jet" passVariables="foo,bar"/>


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire