Hybris Cockpit - 使用模型数据项填充下拉列表

Hybris Cockpit - Populate a Drop-down list with model data items

如何使用模型数据 items 填充在 Hybris 主控室的自定义向导中创建的 Drop-Down 列表?

该向导使用 ZK 框架 组件设计(在 .zul 扩展文件中)。

要在 Hybris Cockpit Wizards 中获取 drop-down 列表,您需要在 MyItem xml 配置文件中调用名为 shortListEditor 的 Hybris 本机编辑器 bean。要在解决方案中走得更远,您需要:

  • 找到向导 xml 配置文件,通常命名为 wizardConfig_MyItem.xml.

  • 将属性(myAttribute 应该是列表或枚举)添加到 MyItem 结构。

  • 为您的属性添加 xml 配置:

    • 如果myAttribute一个List添加:<property qualifier='MyItem.myAttribute' editorCode='shortListEditor'>

    • 如果 myAttribute 一个 Enum 添加:<property qualifier='MyItem.myAttribute' editorCode='shortListEditor'>