7.atomic Widgets
7.atomic Widgets
7.atomic Widgets
Atomic Widgets
Student Exercise
InsuranceSuite Fundamentals - Student Exercise
Atomic Widgets
An insurer wants to extend TrainingApp functionality by capturing more details about each contact. The complete
requirement will be implemented over multiple modules. Recall that you have already implemented the required
data model changes in the previous Extending Data Model module.
In this exercise your job is to make the necessary user interface changes to meet customer requirements. As a
configuration developer you will use the PCF Editor in Guidewire Studio to modify the TrainingApp UI.
In this module, you will first practice the DOT notation. Next, you will review the requirements. Finally, you will
configure the appropriate PCF file to display the fields and deploy your changes.
Prerequisites
You must first complete the following previous module(s):
For this exercise, use TrainingApp, Guidewire Studio, and a supported web browser.
http://localhost:8880/ab/ContactManager.do is the default URL for TrainingApp. To view, edit, and
delete various contacts, log in to TrainingApp as Alice Applegate. The login/password for Alice Applegate is
aapplegate/gw.
Labs
As a configuration developer, you need to understand how to work with the dot notation. In this exercise, you will
use the data dictionary to determine how to reference entities, fields, and properties using dot notation.
For an object named "anABContact" that is of the type ABContact, identify the correct dot notation syntax for the
following:
6. Assuming that anABContact is a legal venue, the type of court for anABContact.
Stop
In this exercise, you will create new atomic widgets to capture and display additional contact details for an existing
details view. Review the widget requirements received from the business analysts. This table summarizes the
requirements for each widget. Refer to the wireframe at the beginning of the exercise to see how the fields will be
displayed in the UI.
As a configuration developer, you want to be able to find fields in the data dictionary and determine their data
model type. As a configuration developer, you want to be able to determine the appropriate widget and Gosu data
type based on the data model type of a field.
Recommended Recommended
Data type
widget(s) in a Detail widget(s) in a List Data type (Gosu)
(Data Model)
View View
3. Use the Data Dictionary and the Widget reference table to complete the following table Note: All the
fields are defined on ABContact entityS
4 Customer Yes
Rating
5 Strategic Yes
Partner
6 Last Yes
Courtesy
Contact
7 Fraud No
Investigation
Number
8 Web Yes
Address
Stop
As a configuration developer, you want to create atomic widgets; bind some of those atomic widgets to entity
fields to display data from the database; and define user-friendly labels.
From the TrainingApp folder, open a command window and start Guidewire Studio for TrainingApp.
Alternatively, use the Start TrainingApp Studio shortcut.
2. Run or Debug the TrainingApp project
Use the main menu, toolbar, or keystroke to run or Debug the server.
Verify that the Run or Debug Console tab shows ***** ContactManager ready *****.
3. Log in to TrainingApp
Use the appropriate internal tools shortcut to open the PCF file in Guidewire Studio.
Keyboard shortcut
Open a PCF file in Studio from the Browser
If you are running an open application project in Guidewire Studio and if internal tools are enabled, you can
automatically open the location being viewed in the application. Use the ALT + SHIFT + E keystroke in the
browser.
Best practices
Adhere to Best practices
Guidewire recommends PCF file should not contain "hard coded" display text. Benefits of display
keys:
The recommended naming convention for customer display keys, is to use a standard prefix such as "Ext". Use
the following syntax to reference a display key:
DisplayKey.get(“NameOfTheKey”)
Hint
View or modify a Display Key value
To view the value, just simply hold down the CRTL key and hover over the Display Key with your mouse. To
modify the value, just simply hold down the CTRL key and left click on the Display Key with your mouse. In
general, the same methods work the same way for other elements in Studio, such as entity fields, Gosu variables,
PCF file references, etc.
Hint
Hover over for tooltips
Simply hover over the PCF element (or property) in the toolbox (or property window) to see the PCF
documentation about what that element (or property) does.
Activity
Verify the work you have done
Keyboard shortcut
Reload PCF changes without restarting the Server
If you are running an open application project in Guidewire Studio and if internal tools are enabled, you can reload
all the page configuration files and display keys for the server.
Important: If you reload PCF files while in edit mode, you may experience unpredictable results. For the current
location, where there is a data modification in progress, the new PCFs may not be reloaded. Therefore, Guidewire
recommends reloading PCF files while in read-only mode as it provides for more predictable results.
Stop
Solution
Solutions
anABContact.CreateTime
anABContact.TaxStatus
anABContact.PrimaryAddress.City
anABContact.Buildings_Ext
(anABContact as ABCompany).NumberOfEmployees
6. Assuming that anABContact is a legal venue, the type of court for anABContact.
(anABContact as ABLegalVenue).VenueType
Solution
Solution
To delete the existing label, right click on it and select Delete from the context menu.
2. Drag and drop widgets inside the existing Input Column
3. Label widget for Contact Analysis label:
Call the get() function of the DisplayKey class in the label property.
Enter the name for the display key in the get() function as a String parameter (between double quotes).
Then enter the text value for the locale and click OK