Enable addition of service states to a company on a claim

As part of extending contacts with an array, extend the ClaimCenter user interface to enable users to add service states to a company that is associated with a claim.

Before you begin

Complete Add support for service state searches to the Address Book.

Procedure

  1. In Guidewire Studio™ for ClaimCenter, navigate in the Project window to configuration > config > Page Configuration > pcf > shared > contacts.
  2. Right-click contacts and click New > PCF File.
  3. For the File name, enter VendorServiceStates, and for File type choose List View, and then and click OK to edit this PCF file.
  4. Click the new list view panel to open its Properties window, then click the Required Variables tab.
  5. Click and add the following new required variable:
    name contactHandle
    type contact.ContactHandle
  6. Click the Code tab and enter the following code:
    property get contact() : Contact { return contactHandle.Contact }
  7. Click the Exposes panel, and then click and click ExposeIterator.
  8. Enter the following values:
    valueType entity.ContactServiceState
    widget VendorServiceStatesLV
  9. From the Toolbox on the right, drag a RowIterator and drop it on the new list view panel, and then set the following properties:
    editable true
    elementName currentServiceState
    toAdd contact.addToContactServiceArea(currentServiceState)
    toRemove contact.removeFromContactServiceArea(currentServiceState)
    value contact.ContactServiceArea
    canPick true
  10. From the Toolbox, drag a new Row and drop it on the RowIterator.
  11. From the Toolbox, drag a new Cell, drop it on the Row, and then set the following cell properties:
    editable true
    id ServiceState
    label displaykey.Web.ContactDetail.ServiceStateName
    value currentServiceState.ServiceState
    unique true
  12. If the outline of the ListViewPanel remains red, it is likely that the editor has lost the valueType of the ExposeIterator in the Exposes tab, VendorServiceStatesLV. To see if that is the case, click the ListViewPanel to open its Properties window. Then, click the Exposes tab, click VendorServiceStatesLV, and, if necessary, reenter the following valueType:
    entity.ContactServiceState
  13. In the Project window, navigate to configuration > config > Page Configuration > pcf > shared > contacts, and then double-click ContactBasicsDV.Company to edit this PCF file.
  14. On the right, in the input column containing the TextAreaInput called Notes, drag a ListViewInput from the Toolbox and drop it above Notes.
  15. Click the new ListViewInput widget and set the following properties:
    def VendorServiceStatesLV(contactHandle)
    label displaykey.Web.ContactDetail.ServiceStates
    labelAbove true
    boldLabel true
    The new list view input remains red until you add the Toolbar widget in the next step.
  16. From the Toolbox on the right, drag a Toolbar and drop it in the ListViewInput.
  17. From the Toolbox on the right, drag an IteratorButtons widget and drop it on the toolbar so you can add and remove states.
  18. Click the new IteratorButtons widget and set the following property:
    iterator VendorServiceStatesLV.VendorServiceStatesLV

What to do next

Test service state entity and array extensions