刷新一个小部件/列表视图小部件

huangapple go评论102阅读模式
英文:

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.

英文:

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

答案1

得分: 6

如果您已经在数据库或其他资源中加载了新数据,需要提取数据,可以查看类似于PolicyCenter中“刷新”按钮的Underwriting Rules Import/Export Status界面上的按钮。

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

如果您需要在屏幕数据输入后更新ListView,需要更新PCF中RowIterator正在调用的变量。

<RowIterator
  editable="false"
  elementName="account"
  value="items" <!-- 更新RowIterator使用的节点 --> 
  valueType="entity.Account[]">
英文:

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[]"> 

huangapple
  • 本文由 发表于 2023年4月7日 00:02:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/75951543.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定