11SmartScript Tags

SmartScript Tags

This chapter explains Oracle’s Siebel SmartScript tag definitions by using an example. It covers the following topic: Script Tags for SmartScript.

Script Tags for SmartScript

The SmartScript tag definitions are explained using an example from the template file: CCSmartScriptPlayerApplet.swt.

Note: All tags are displayed in bold type.
<!- Start of CCSmartScriptPlayerApplet.swt ->


<!-- Start of Script title -->

<table width="98%" border=0  cellspacing="0" cellpadding="0" align="center">

<swe:form name="SmartScriptForm">

<!-- Start of Script Section-->

<!-The block enclosed by the <swe:control id="SmartScriptLabel"> is used to display any 
script information on the HTML page

swe:control - generic SWE tag. Provides a placeholder in an Applet Web Template for a 
control object or a list column object. The control could either be mapped in Tools or 
defined at runtime.

		Id -SmartScriptLabel: The id uniquely identifies that control as a placeholder 
		for the translated label of the smartScript

<tr>

			<td width="66%">

			<div class=CmdTxt><swe:control id="SmartScriptLabel" ><div><p></td>

			<td width="33%">&nbsp;</td>

</tr>

</table>

<!-- End of script section -->

<!-- Start of Pages section -->

<!-The tag <swe:control id=SSPageLabel> is used to display the current active page ->

swe:control - a tag that's used as a placeholder for a control (either mapped in Tools 
or defined at runtime)

	Id- SSPageLabel: the id uniquely identifies the control as a placeholder for the 
	translated label of the page

<table class="AppletStyle1" width="98%"
cellspacing="0"cellpadding="0" border="0" align="center">

<tr>

<td>

			<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">

     	<tr class="AppletBlank">

	 		<td class="AppletTitle" valign="top" width="8"><img src="images/aplt_opn_d.gif" 
	 		width="8" height="10" border="0" alt="" /></td>

	 		<td colspan="5">

	 			<table cellspacing="0" cellpadding="0" border="0">

				 <tr>

				 <td class="AppletTitle"><nobr><swe:control id="SSPageLabel"/></nobr></td>

				 <swe:control id="6">

	 			<td class="AppletButtons" valign="middle" nowrap>

				 <swe:this property="FormattedHtml" hintText="Save Answers" 
				 hintMapType="Control"/>

				 </swe:control></td>

				 <td class="AppletTitle" width="22"><img src="images/aplt_curve_d.gif" 
	 			height="18" width="22" border="0" alt=""></img></td>

	 			 <td width="100%" class="AppletBlank" align="right">

				 <span class=required>*</span>

	 			<swe:control id=1500 property="DisplayName" hintText="Required Label" 
	 			hintMapType="Control"/></td>

    		</tr>

	 		</table>

 	 </td>

   </tr>

   </table>

</td>

</tr>

<tr>

<td class="AppletStyle1">

		<table width="100%" cellpadding="2" cellspacing="0" border="0" align="center">

		<tr>

		<td class="AppletBorder">

			<table valign="top" width="100%" cellpadding="2" cellspacing="0" border="0" 
			class="AppletBack">

			<tr>

			<td colspan="3"><img src="images/spacer.gif" width="1" height="3"></td></tr>



			<swe:error>

			<tr>

			<td width=20%>&nbsp;</td>

			<td class="error" width=75%>

		<swe:this property="FormattedHtml"/></td>

		<td width=5%>&nbsp;</td>

		</tr>

		<tr>

		<td colspan="3">

		<img src="images/spacer.gif" width="1" height="3"></td></tr>

		</swe:error>

		</table>
 

<!--Start of questions in the current section on the Current Page -->
<!-The block enclosed by the <swe:for-each id="SSQuestionList" Count="Dynamic" 
StartValue=1000 IteratorName="SSQuestionIndex"> encloses all questions displayed within 
the current page --> 

swe:for-each- generic SWE tag used as an iterator.

		Id = SSQuestionList: Identifier that uniquely identifies this iterator to be 
		pertaining to that of SmartScript questions

		Count = Dynamic: Denotes that the number of times the tag must iterate its 
		contents. This is dynamically determined at runtime depending on the number of 
		questions that need to be displayed.

		StartValue = 1000: Indicates the value at which the iteration will start. The tag 
		will start the iteration by assigning this value to an internal iterator and will 
		increment it by one for each iteration.

		Iterator Name = SSQuestionIndex: A name for the iterator. This name  can be used 
		to get the value of the iterator during the iteration by using the syntax 
		swe:iteratorName.


<!-The block enclosed by the <swe:control id=SSQuestion> is used as a template for all 
questions other than Information type questions--> 

swe:control- generic SWE tag. Provides a placeholder in an Applet Web Template for a 
control object or a list column object.
		Id = SSQuestion Identifies the control as a question.




swe:this - Refers to the object inside which it is placed.

		Property = RequiredIndicator: If the displayed question is mandatory then using 
		this tag displays the default required indicator used within the system.

		Property = DisplayName: Shows the title of the question

		Property = FormattedHtml: Shows the control for the question 

<!-The block enclosed by the < swe:control id=SSInfoQuestion > is used as a template for 
all information type questions--> 

swe:control- generic SWE tag. Provides a placeholder in an Applet  Web Template for a 
control object or a list column object.

		Id = SSInfoQuestion Identifies the control as a question.

swe:this  - Same as above




<!-Start of questions block->



<swe:for-each id="SSQuestionList" Count="Dynamic" StartValue=1000 
IteratorName="SSQuestionIndex">


<swe:control id="SSInfoQuestion">
		<table valign="top" width="100%" cellpadding="2" cellspacing="0" border="0" 
		class="AppletBack">

		<tr>

		<td width=20%>&nbsp;</td>

		<td width=75%><swe:this property="DisplayName"/></td>

		<td width=5%>&nbsp;</td>

		</tr>

		<tr>

		<td colspan="3"><img src="images/spacer.gif" width="1" height="3"></td></tr>

		</table>

</swe:control>



<swe:control id="SSQuestion">

		<table valign="top" width="100%" cellpadding="2" cellspacing="0" border="0" 
		class="AppletBack">

		<tr>

		<td width=20%>&nbsp;</td>

		<td width=75%>

		<div class="scLabel">

		<swe:this property="RequiredIndicator"/>

		<swe:this property="DisplayName"/>

		</div>

		<span class="scField">

		<swe:this property="FormattedHtml"/></span>

     </td>

		</tr>

		</table>

</swe:control>


</swe:for-each>

<!-- End of questions block -->


<!-Page Divider-->

<table valign="top" width="100%" cellpadding="2" cellspacing="0" border="0" 
class="AppletBack">

<tr>

<td width=20%>&nbsp;</td>

<td width=75%>&nbsp;</td>

<td width=5%>&nbsp;</td>

</tr>

<!-- End of page divider -->


<!-Start of Buttons -->

<tr>

<td>&nbsp;</td>

<td>

			<table cellpadding="0" cellspacing="0" border="0">

			<tr>

			<!-- NextSection -->

			<swe:control id="4">

			<td valign="middle" nowrap>

			<swe:this property="FormattedHtml" hintText="Next Section" 
			hintMapType="Control"/>

			</td>

			</swe:control>


              
			<!-- PreviousSection -->

			<swe:control id="3">

			<td valign="middle" nowrap>

			<swe:this property="FormattedHtml" hintText="Previous Section" 
			hintMapType="Control"/>

			</td>

			</swe:control>


			<!-- Finish: 1 -->

			<swe:control id="1">

			<td valign="middle" nowrap>&nbsp;<img src="images/btn_div.gif">&nbsp;</td>

			<td valign="middle" nowrap>

			<swe:this property="FormattedHtml" hintText="Finish Script" 
			hintMapType="Control"/>

			</td>

			</swe:control>



			<!-- Save: 5 -->

			<swe:control id="5">

			<td valign="middle" nowrap>

			<swe:this property="FormattedHtml" hintText="Save Script" hintMapType="Control"/

			>

			</td>

			</swe:control>



			<!-- Cancel: 2 -->

			<swe:control id="2">

			<td valign="middle" nowrap>

			<swe:this property="FormattedHtml" hintText="Cancel Script" 
			hintMapType="Control"/>

			</td>

			</swe:control> 

			</tr>

			</table>

</td>

<td>&nbsp;</td>

</tr>

<!-- End Buttons-->



<!-- Page divider -->

<tr>

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<!-- End of page divider -->

</table>

</td>

</tr>

</table>

</td>

</tr>

</swe:form>

</table>

<!-- End of CCSmartScriptPlayerApplet.swt-->

</swe:form>



<!-- End of CCSmartScriptPlayerApplet.swt-->