Example code table: CdConditionAttributeTp

The following is an example of the CdConditionAttributeTp code table:
<CodeTable id="CdConditionAttributeTp" objectClass="com.dwl.admin.ConditionAttributeTypeBObjType" application="admin" i18n="true">
<Field name="tpCd" label="codeTable.details.field.tpCd.label" converter="" format="number" required="true" editComponent="output" addComponent="input"/>
<Field name="langTpValue" label="codeTable.details.field.langType.label" converter="" format="" required="" editComponent="output" addComponent="output">
	<TableItems application="admin" table="CdLangTp" objectClass="com.dwl.admin.LanguageTypeBObjType" labelItem="Name" valueItem="LangTpCd" value="langTpCd"/>
</Field>
<Field name="name" label="codeTable.details.field.name.label" converter="" format="longText" required="true" editComponent="input" addComponent="input"/>
<Field name="description" label="codeTable.details.field.description.label" converter="" format="longText" required="false" editComponent="inputTextArea" 	addComponent="inputTextArea"/>
<Field name="conditionUsageTpCd" label="codeTable.details.field.conditionUsageTpCd.label" converter="" format="number" required="true" editComponent="selectOneMenu" addComponent="selectOneMenu">
	<TableItems application="admin" table="CdConditionUsageTp" objectClass="com.dwl.admin.EObjCdConditionUsageTypeBObjType" labelItem="Name" valueItem="TpCd" value="conditionUsageTpCd"/>
</Field>
<Field name="expiryDt" label="codeTable.details.field.expiryDt.label" converter="" format="date" required="false" editComponent="input" addComponent="input"/>
<Field name="lastUpdateDt" label="codeTable.details.field.lastUpdateDt.label" converter="" format="date" required="" editComponent="output" addComponent="output"/>
</CodeTable>

The CodeTable tag has the following attributes:

  • id—Represents the code table name
  • objectClass—Represents the SDO class
  • application—Must be admin
  • i18n—Indicates if the code table is language dependent

The CodeTable tag contains the definitions of all the code table's fields that are presented through the interface.

The Field tag has the following attributes:

  • name—Represents the name of the generated field in the SDO class.
  • label—Represents the resource key of the field label that needs to displayed. The label value is read from the application resource bundle, CustomerBusinessAdminweb.properties.
  • format—Represents the field format. For example if the field is a date field, the format="date".
  • required—Indicates if the value is required. Currently set only for drop down UI components.
  • editComponent—Indicates how the field is displayed in the Edit Code Table Type screen.
  • addComponent—Indicates how the field is displayed in the Add Code Table Type screen.

The addComponent and editComponent attributes indicate the type of UI component to be used to present the code table field on the user interface. The following types of UI components are supported:

  • output—Field is display only
  • input—Field is displayed as input text
  • inputTextArea—Field is displayed as an input text area
  • selectOneMenu—Field is displayed as a drop down combo box
  • selectOneRadio—Field is displayed as a pair of radio buttons

A field that has the addComponent and editComponent values as a "selectOneMenu" has a TableItems tag that indicates the code table and the application from where to populate its drop down.

The TableItems tag has the following attributes:

  • application—Must be admin
  • table—Represents the code table name that populate the drop down box
  • objectClass—Represents the SDO class
  • labelItem—Represents the label displayed in the drop down for each item
  • valueItem—Represents the value item for each label
  • value—Represents the value used for value binding in the .jsp file

The pages used to administer the code tables are:

  • codetables.jsp
  • codeTableDetails.jsp
  • editCodeTables.jsp
  • addCodeTable.jsp