Show/Hide Toolbars

This topic contains an XML code sample that results in the General Subpoena block for the following wizard page.

wizard_screen_sample_zoom75

Note: You can customize the tabbing order by adding a tabIndex attribute to each of the <tc:field> and <tc:wizardParameter> tags within an XML file. For details, see tabIndex.

The XML sample in this topic demonstrates how to include the following examples in an XML file:

Using the <tc:useClass> tag to refer to the MyCustomBlock.class file.

Using the <tc:blockTemplate> tag with the optional blockTitle attribute.

Adding custom fields to a block. This custom field in this code sample are text, number, and lookup table fields.

Using formatting tag attributes for the number field, such as format and size.

Adding wizard parameters to a block. Because this XML sample contains parameters, you can only use it in wizards. To use the code sample in an object view, remove or comment out the parameters from the code.

Specifying a custom JavaScript file to add styles to the CJB.

The custom block image shows the resulting block on a wizard page.

Code Sample

<?xml version="1.0" ?>

<tc:transform version="4.0" xmlns:tc="http://www.mitratech.com/schemas/2008/custom">

<tc:section category="DISP">

<tc:blockTemplate blockTitle="Wizard Custom Block Example">

<!-- Use a custom java class -->

<tc:useClass id="cjb" name="MyCustomBlock"/>

<div class="bg_blockcolor">

<table cellspacing="10" width="100%">

<tr>

<td width="50%" align="left" valign="top">

<table cellpadding="3" width="96%">

<!-- System field -->

<tr valign="top">

<td align="right" class="tdlabel2">

<tc:label colon="true" required="true" key="custom.common.legal.matterName"></tc:label>

</td>

<td>

<!-- Default value of field generated by custom java class -->

<tc:field maxLength="250" name="enterpriseEntity.name" size="77" value="${cjb.generateName}"></tc:field>

</td>

</tr>

<!-- Custom field of type text -->

<tr valign="top">

<td align="right" class="tdlabel2">

<tc:label colon="true" name="MatterDescriptionDI" category="DISP"></tc:label>

</td>

<td>

<tc:note cols="80" category="DISP" name="MatterDescriptionDI" rows="5"></tc:note>

</td>

</tr>

<!-- Custom field of type number -->

<tr valign="top">

<td align="right" class="tdlabel2">

<tc:label colon="true" name="AttorneysFeeAwardedDI" category="DISP"></tc:label>

</td>

<td>

<!-- Number value formatted as currency -->

<tc:number name="AttorneysFeeAwardedDI" category="DISP" format="CURRENCY" size="12"></tc:number>

</td>

</tr>

<!-- Custom field of type lookup -->

<tr valign="top">

<td align="right" class="tdlabel2">

<tc:label colon="true" name="MatterSecurityDI" category="DISP"></tc:label>

</td>

<td>

<tc:lookup nullValueDisplayString="(None Selected)" category="DISP" name="MatterSecurityDI" tableCode="SECE" allowNullValue="true"></tc:lookup>

</td>

</tr>

<!-- Wizard parameter -->

<tr valign="top">

<td align="right" class="tdlabel2">

<tc:wizardParameterLabel name="CreateBudgetNow" colon="true"></tc:wizardParameterLabel>

</td>

<td>

<tc:wizardParameter name="CreateBudgetNow" wizardUniqueKey="DNDI"></tc:wizardParameter>

</td>

</tr>

</table>

</td>

</tr>

</table>

</div>

<!-- Include custom javascript uploaded to Top Level > System > HTTPRoot -->

<script src="./httproot/myjs.js" type="text/javascript"> </script>

</tc:blockTemplate>

</tc:section>

</tc:transform>