Configuring Sun Master Indexes

Adding a Field to the Master Index Object Structure

Once you define an object in object.xml, you can add new fields to the object and configure the properties for those fields. Be sure to add the field to any relevant structures in the remaining configuration files. For information about field naming restrictions, see Master Index Field Name Restrictions.

ProcedureTo Add a Field (Configuration Editor)

  1. In the Projects window, right-click the Configuration node in the project you want to modify, and then click Edit.

    The Configuration Editor appears.

  2. Expand the object structure until you see the object to which you want to add a field.

  3. In the object tree panel, do one of the following:

    • To add the field to the end of the object’s field list, select the name of the object to which you want to add a new field and then click Add Field in the toolbar.

    • To add the field immediately following an existing field, select the field after which you want to add the new field and then click Add Field in the toolbar.

      The tree expands and a new field is inserted.

  4. To change the field name, double-click the new field, type the new name, and then press Enter.

  5. Continue to Modifying Master Field Properties.

ProcedureTo Add a Field (XML Editor)

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click object.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the tag element defining the object to which you want to add a field.

  3. Under the tag element, create a new fields element.

    For example:


    <nodes>
       <tag>Address</tag>
       <fields>
       </fields>
    <nodes>
  4. Specify the field properties described in Master Index Field Property Elements within the new fields tags.

    For example:


    <fields>
       <field-name>AddressType</field-name>
       <field-type>string</field-type>
       <size>8</size>
       <updateable>true</updateable>
       <required>true</required>
       <code-module>ADDRTYPE</code-module>
       <pattern/>
       <key-type>true</key-type>
    </fields>
  5. Save and close the file.