Add support for service state searches to the Address Book

Enable ClaimCenter users to use the Address Book to search for contacts in ContactManager by ServiceState.

Before you begin

Complete Map the new entity and array extensions in ClaimCenter.

Procedure

  1. Open Guidewire Studio™ for ClaimCenter.
  2. Navigate in the Project window to configuration > config > Localizations > Resource Bundle 'display' and double-click display.properties to open this file in the editor.
  3. Press Ctrl+N and search for Web.ContactDetail.RetiredMessage.
  4. Insert a new line below that one and add the following entries:
    • Web.ContactDetail.ServiceStateName = State Name
    • Web.ContactDetail.ServiceStates = Service States
  5. In the Project window, navigate to configuration > config > Page Configuration > pcf > addressbook, and then right-click addressbook and click New > PCF File.
  6. For the File name, enter AddressBookServiceStates.
  7. For File type, click List View, and then click OK to edit this PCF file.
  8. Click the new ListViewPanel to open its Properties window, and then click the Required Variables tab.
  9. Click the green plus icon, , and add the following new required variable:
    name contact
    type Contact
  10. Click the Exposes tab, and then click the green plus icon, , and choose ExposeIterator.
  11. Enter the following values:
    valueType entity.ContactServiceState
    widget AddressBookServiceStatesLV
  12. From the Toolbox on the right, drag a RowIterator and drop in on the list view.
  13. Select the RowIterator widget and set the following properties:
    editable true
    elementName currentServiceState
    toAdd contact.addToContactServiceArea(currentServiceState)
    toRemove contact.removeFromContactServiceArea(currentServiceState)
    value contact.ContactServiceArea
    canPick true
  14. From the Toolbox on the right, drag a a new Row and drop it on the RowIterator.
  15. From the Toolbox on the right, drag a new Cell and 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
  16. If the outline of the ListViewPanel remains red, it is likely that the editor has lost the value type of the ExposeIterator named AddressBookServiceStatesLV in the Exposes tab. To see if that is the case, click the ListViewPanel to open its Properties window. Then, as described in step 9, click the Exposes tab, and then click AddressBookServiceStatesLV and, if necessary, reenter the following valueType:
    entity.ContactServiceState
  17. In the Project window, navigate to configuration > config > Page Configuration > pcf > addressbook, and then double-click AddressBookContactBasicsDV.Company to edit this PCF file.
  18. On the right, in the InputColumn with the TextAreaInput called Notes at its bottom, drag a ListViewInput widget and drop it above Notes. Then enter the following attributes:
    def AddressBookServiceStatesLV(contact)
    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.
  19. From the Toolbox on the right, drag a Toolbar and drop it in the new ListViewInput above the ListViewPanel.
  20. From the Toolbox on the right, drag an IteratorButtons widget and drop it on the toolbar so you can add and remove states.
  21. Click the new IteratorButtons widget and set the iterator property value to AddressBookServiceStatesLV.AddressBookServiceStatesLV.

What to do next

Enable addition of service states to a company on a claim