guidewiregosu

How refresh a widget/List View widget


I'd like to force ListView to reload the data after I click on a Button Input. It looks like a trivial task but cannot find how to refresh a widget or even a page/location in gosu


Solution

  • If you have new data loaded in the db or another resource that you need to fetch, checkout something like the "Refresh" button on the Underwriting Rules Import/Export Status screen in PolicyCenter.

    <!-- From RuleExportImportStatusScreen.pcf --> 
          <ToolbarButton
            action="null"
            id="RefreshButton"
            label="DisplayKey.get('Button.Refresh')"
            tooltip="DisplayKey.get('BizRules.RuleExportImportStatusScreen.RefreshTooltip')"/>
    

    If instead you need to update the ListView after onscreen data entry, update the variable in the PCF that the RowIterator is calling.

    <RowIterator
      editable="false"
      elementName="account"
      value="items" <!-- Update the nodes that RowIterator uses --> 
      valueType="entity.Account[]">