How i can set Template to a header and another Template to item in a Segment?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

i want to set Template for a header of segment has label and image from fabric and another Template in same segment, How.

this is my try

  1. selfMain.view.segFrm2.widgetDataMap = {lblTitle:"title",lblHeader:"pageTitle",logo:"pageLogo",template:"SegTem"};
  2. selfMain.view.segFrm2.widgetDataMap = {lblTitle:"title",lblHeader:"pageTitle",logo:"pageLogo",template:"SegTem"};

selfMain.view.segFrm2.widgetDataMap ={,lblHeader:"pageTitle",logo:"pageLogo",template:"segSec"};

Note : point 2 has two line.

Hello @Jvsmine Knox​

You have a section header template and rowTemplate. You need t configure all the widget details in the WidgetDataMap.

this.view.seg.widgetDataMap": {

"Flex0c34c8938a58b42": "Flex0c34c8938a58b42",

"Flex0e7e4cf968bf046": "Flex0e7e4cf968bf046",

"Image0b749a515e01f4d": "Image0b749a515e01f4d",

"Label0ba17603f0ff64c": "Label0ba17603f0ff64c",

"Label0bf8ef36387194c": "Label0bf8ef36387194c"

}

To pass the data you have pass in the below format.

this.view.seg.setData(

[

[{

"Image0b749a515e01f4d": "imagedrag.png",

"Label0bf8ef36387194c": "Label"

},

[{

"Label0ba17603f0ff64c": "Label"

}, {

"Label0ba17603f0ff64c": "Label"

}, {

"Label0ba17603f0ff64c": "Label"

}]

],

[{

"Image0b749a515e01f4d": "imagedrag.png",

"Label0bf8ef36387194c": "Label"

},

[{

"Label0ba17603f0ff64c": "Label"

}, {

"Label0ba17603f0ff64c": "Label"

}, {

"Label0ba17603f0ff64c": "Label"

}]

]

]);

i can't understood .. must i definition all items in all templates?

"Flex0c34c8938a58b42": "Flex0c34c8938a58b42",

"Flex0e7e4cf968bf046": "Flex0e7e4cf968bf046",

"Image0b749a515e01f4d": "Image0b749a515e01f4d",

"Label0ba17603f0ff64c": "Label0ba17603f0ff64c",

"Label0bf8ef36387194c": "Label0bf8ef36387194c"

____________________________________________________

Based on what I understand

selfMain.view.segFrm2.widgetDataMap= {

"fff": "fff",// this is Flx in segment Header

"lblHeader": "lblHeader", // this item for data

"logo": "logo"// this item for image

};

Hello @Jvsmine Knox​

Now you have a sectionHeader Temaplate and row Teamplate. You need to configure all the section and row templates widgets in the widgetDataMap. After that create an array with above format and assign to segment.

From example, sectionHeader Template has a label and image and rowTemplate has a label.