Static filters

A static typelist filter causes the typelist to display only a subset of the typecodes for that typelist. Therefore, a static filter narrows the list of typecodes to show in the typelist view in the application. Guidewire calls this kind of typelist filter a static typefilter.

In the Typelist editor of Guidewire Studio™, you define a static filter at the level of the typelist by defining a typefilter for that particular typelist.

Studio manages the typelist XML file for you automatically. If you examine this file, you see that Studio uses the following XML syntax to define a static typelist filter. (In this case, a static filter that defines—or includes—a subset of the available typecodes.)

<typelistextension xmlns="http://guidewire.com/typelists" desc="Yes, no or unknown" name="YesNo">
  <typecode code="No" desc="No" name="No" priority="2"></typecode>
  <typecode code="Yes" desc="Yes" name="Yes" priority="1"></typecode>
  <typecode code="Unknown" desc="Unknown" name="Unknown" priority="3"/>
  <typefilter desc="Only display Yes and No typelist values" name="YesNoOnly">
    <include code="Yes"/>
    <include code="No"/>
  </typefilter>
</typelistextension>

The XML in this example declares each typecode on the typelist (Yes, No, and Unknown). It then defines a filter named YesNoOnly that limits the available values to simply Yes and No. This filter is the static (fixed) filter.

See also