11.popups - View and Edit
11.popups - View and Edit
11.popups - View and Edit
Student Exercise
Popups: View and Edit - Student Exercise
As a configuration developer, you want to be able to create, configure and open popup locations so that
the users can see and/or edit more information about an object. In this lab, you will first create the
Interaction Popup. The popup will allow users to edit and view an interaction. Next, you will modify the
Summary cell widget in the InteractionsLV, so that clicking it navigates to the popup.
Prerequisites
You must first complete the following previous lesson(s):
For this lab, 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.
Modify the cell widget for the Summary field to be a navigable link to the editable Interaction Popup.
The Popup should display the entity from the row that the user clicked on.
Note: Use your best judgment for field ordering, display keys, and input widget selection. Review the
Atomic Widgets lesson for more details if needed.
Guidewire API
The startInEditMode property
If this property is set to true then the location will open in edit mode allowing the user to modify the data
immediately. If the property is set to false then the location will open in read-only mode and the user will
need to click on the edit button to edit the details. This property could be also set dynamically, e.g. based
on an expression, result of a function call or a parameter received from the parent location in case of
Popups.
Guidewire API
The canEdit property
This property determines if the location (and any containers inside it) can or cannot be in edit mode. If the
startInEditMode property is set to true or the location has a Toolbar and Edit Buttons widget then the
canEdit property must be set to true. The default value is false.
Hint
Referencing the object associated with a row
When you click on a cell in a row, you want to open the popup and pass in the object that is associated
with that specific row. Remember, the variable defined in the elementName attribute of the Row Iterator is
always the variable that will store that associated object. As a configuration developer, you don’t have to
worry about indexes. You can just simply reference the variable and the PCF framework will determine
which object from the array is associated with that row the user clicked on.
Review
Navigating to a location
Review the Introduction to Locations lesson if you need tips on how to define navigation in Guidewire
applications.
Activity
Verify the work you have done
Solution
Exact details on how to complete the lab.
3. Add an inline Screen container and set the following properties: startInEditMode, canEdit,
title
5. Specify a variable for the parameter (same name and same type)
From the toolbox, drag and drop a Toolbar into the screen you just added.
Drag and drop an Edit Buttons widget into the toolbar.
7. Add a detail view
Drag and drop an Input Column widget into the Detail View.
Notice that the Detail View is no longer red.
Drag and drop a Boolean Radio Button Input into the Input Column below the Interaction Date
input.
Set the editable property to true.
Set the id property to InitiatedByContact.
Set the label property to DisplayKey.get("Ext.InitiatedByContact "). This is a new display key, so
create it using Studio.
Set the value property to anInteraction.InitiatedByContact.
11. Add an input for the Channel Type field
Drag and drop a TypeKey Input into the Input Column below the Initiated By Contact input.
Set the editable property to true.
Set the id property to ChannelType.
Set the label property to DisplayKey.get("Ext.ChannelType").
Set the value property to anInteraction.Channel.
Notice that the valueRange and valueType fields were automatically entered.
12. Add an input for the Summary field
Drag and drop a Text Input into the Input Column below the Channel Type input.
Set the editable property to true.
Set the id property to Summary.
Set the label property to DisplayKey.get("Ext. Summary").
Set the value property to anInteraction.Summary.
13. Add an input for the Associated User field
Drag and drop an Alt User Input into the Input Column below the Summary input.
Set the editable property to true.
Set the id property to AssociatedUser.
Drag and drop a Range Input into the Input Column below the Associated User input.
Set the editable property to true.
Set the id property to ReasonType.
Set the label property to DisplayKey.get("Ext.ReasonType").
Set the value property to anInteraction.Reason.
Notice that the valueRange and valueType fields were automatically entered.
15. The completed popup should look like this screenshot:
16. On Interactions_ExtLV, configure the action property of the Summary cell to open the
Interaction_ExtPopup