(One intermediate revision by the same user not shown)
Line 9:
Line 9:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Mappings|{{RootFieldType|SyncList`1|[[#ItemMapping|ItemMapping]]}}|TypeAdv0=true| A list of item Mappings to map data feed item types to Feed Templates.
|Mappings|{{RootFieldType|SyncList`1|[[#ItemMapping|DataFeedItemMapper.ItemMapping]]}}|TypeAdv0=true| A list of item Mappings to map data feed item types to Feed Templates.
}}
}}
== Sync Delegates ==
== Sync Delegates ==
{{Table ComponentTriggers
{{Table ComponentTriggers
|OnSetupTemplate(IButton, ButtonEventData)|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]]: button, [[Type:ButtonEventData|ButtonEventData]]: data> -> [[Type:Void|Void]] : HIDDEN METHOD| Set up a basic settup with this component with a bunch of example UIs.
|OnSetupTemplate:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Set up a basic settup with this component with a bunch of example UIs.
}}
}}
Latest revision as of 06:30, 17 March 2025
Component image
Data Feed Item Mapper component as seen in the Scene Inspector
The DataFeedItemMapper allows you to define which data feed items map to which UI templates. It does this via the list Mappings, which take classes that extend DataFeedItem and If they match a mapping in the list it Duplicates that item's template and adds it into the list.
If ItemType is a type that has generic single letter arguments, the type won't be accepted if it's arguments in order don't match the arguments in this list in order.
The template to duplicate when matched with this item mapping.
Usage
This component is to be put into a Component:SingleFeedView or similar so that the component it is specified inside of can use this component to map incoming feed items from the data feed to UI or object templates.