Skip to main content
summaryrefslogtreecommitdiffstats
blob: 6fc52db75dc1061fbc54585eeb9017030e4c0926 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<link rel="STYLESHEET" href="../../../book.css" charset="ISO-8859-1" type="text/css"/>
<TITLE>&lt;c:userRegion&gt; - Standard JET2 Control Tags</TITLE>
</HEAD>
<BODY>
<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
	<TBODY>
		<TR>
			<TH align="left">
			<P>&lt;c:userRegion&gt;</P></TH>
			<TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
		</TR>
	</TBODY>
</TABLE>
<HR>
<P><B>userRegion</B></P>
<P><P>               Define a region in the generated text where users may write customized code. <P><P>The tag must contain a single 'initialCode' tag. Content before the initialCode tag is considered a 'begin marker', while content after it is considered an<P>'end marker'. During execution, the existing file is searched for the begin and end markers. If found, the content of the user region tag is replaced with<P>the content found in the existing file. If the markers are not found (or the file does not exist), then the markers, along with the content of the initialCode<P>tag are written.<P>            </P>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Tag Summary</TH></TR>
		<TR>
			<TD width="10%">required</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;c:userRegion&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to be written</I><BR>
			&lt;/c:userRegion&gt;
			</SPAN></TD>
		</TR>
		<TR>
			<TD width="10%">full tag</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;c:userRegion&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>content to be written</I><BR>
			&lt;/c:userRegion&gt;
			</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Example</TH></TR>
		<TR>
			<TD width="10%"></TD>
			<TD><SPAN style="font-family: monospace">
<!-- Begin userRegion example -->
            &lt;%-- Define user region 101. Code in block will never be updated by subsequent executions --%&gt;<BR>
            &lt;c:userRegion&gt;<BR>
            // BEGIN region 101<BR>
			&nbsp;&nbsp;&lt;c:initialCode&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>default code</I><BR>
			&nbsp;&nbsp;&lt;/c:initialCode&gt;<BR>
            // END region 101<BR>
            &lt;/c:userRegion&gt;<BR><BR>
            
            &lt;%-- Define user region 102. Code in block will be updated by subsequent 
            executions only if @generated is found in block --%&gt;<BR>
            &lt;c:userRegion&gt;<BR>
            // BEGIN region 102<BR>
			&nbsp;&nbsp;&lt;c:initialCode unmodifiedMarker="@generated"&gt;<br>
			&nbsp;&nbsp;&nbsp;&nbsp;// @generated<BR>
			&nbsp;&nbsp;&nbsp;&nbsp;<I>default code</I><BR>
			&nbsp;&nbsp;&lt;/c:initialCode&gt;<BR>
            // END region 102<BR>
            &lt;/c:userRegion&gt;<BR>
<!-- End userRegion example -->
</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<P></P></BODY>
</HTML>

Back to the top