Understanding PCF modes

Certain included files or elements are modal. The basic idea is that you can define several different file versions, or modes, of a single shared section. Thus, any PCF page that includes the section can decide at run-time which file version to use, possibly based on the value of some variable.

If it is possible for the PCF file to have multiple modal versions, then you see Shared section mode above the shared area (which Studio shades or high-lights in blue). If you click the mode, Studio shows a drop-down of all the possible modes. You can use the drop-down to select a different modal file. If you do so, then Studio updates the screen to reflect your change.

For example, in ClaimCenter (the other Guidewire applications provide similar examples), PCF file ExposureDetailScreen contains a shared area. The mode drop-down contains a number of possible modal files that you can embed into the ExposureDetailsScreen. In this screen, the drop-down shows the following:

  • Baggage
  • Bodilyinjurydamage
  • Content
  • EmployerLiability
  • ...

To determine if a PCF file has multiple modal versions, you can also look at the PCF file names in Studio. If you see multiple file names that include a common name followed by a dot then a different name, then this is a modal file. For example, in ClaimCenter, you see the following under the exposures node in the Resources tree:

  • ExposureDetailDV.Baggage
  • ExposureDetailDV.Bodilyinjurydamage
  • ExposureDetailDV.Content
  • ExposureDetailDV.Employerliability
  • ...

Each individual file is a modal version of the ExposureDetailDV PCF file, which you can embed into another file, in this case, the ExposureDetailsScreen.