Add support for service states to the ContactManager user interface
Enable ContactManager users to work with the ServiceState property when editing and viewing contacts.
Before you begin
Procedure
- Open Guidewire Studio™ for ContactManager.
- Navigate in the Project window to and double-click display.properties to open this file in the editor.
-
Press Ctrl+F and search for the entry
Web.ContactDetail.RetiredMessagein the file. -
Add a new line below that entry, and then enter the following display keys:
- Web.ContactDetail.ServiceStateName = State Name
- Web.ContactDetail.ServiceStates = Service States
- In the Project window, navigate to , and then double-click ContactBasicsDV.ABCompany to edit this PCF file.
-
On the right, at the bottom of the input column containing the
TextAreaInputcalled Notes, drag aListViewInputfrom the Toolbox and drop it above Notes. -
Click the new
ListViewInputand set the following properties:label displaykey.Web.ContactDetail.ServiceStates labelAbove true boldLabel true -
From the Toolbox, drag a
RowIteratorand drop it on the new list view panel, and then click it and set the following properties:editable true elementName currentServiceState toAdd contact.addToContactServiceArea(currentServiceState) toRemove contact.removeFromContactServiceArea(currentServiceState) value contact.ContactServiceArea canPick true The new list view input remains red until you add theRowwidget in the next step. -
From the Toolbox, drag a
Rowand drop it on theRowIterator, and then drag aCell, and drop it on theRow. -
Click the cell and set the following cell properties:
editable true id ServiceState label displaykey.Web.ContactDetail.ServiceStateName value currentServiceState.ServiceState unique true -
When you dropped the
RowIterator, the PCF editor created aListViewPanelas a container for it. Click theListViewPaneland set its id property to CurrentServiceStateLV. -
From the Toolbox on the right, drag a
Toolbarand drop it above theListViewPanelnamed CurrentServiceStateLV. -
From the Toolbox, drag an
IteratorButtonswidget and drop in on the toolbar so you can add and remove states. -
Click the new
IteratorButtonswidget and set the property iterator to CurrentServiceStateLV.
