Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Banner and BannerFilter Controls

          Banner and BannerFilter Controls

          Use the Banner control to create a banner and banner filter for the pages of the Consumer Goods Cloud offline mobile app. You can use the BannerFilter control to filter the banners based on the defined search criteria. The Banner control is available in the UI contracts as a subnode following the Page node.

          Required Editions

          Available in: Lightning Experience in Performance, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled.

          Banner Control

          The Banner control is available in all the pages on the UI contract, except SingleSectionDialogPage. You can have only one Banner control under a Page node. The Banner control supports only an ItemSelectedEvent. On a mobile device, only the banner filter is visible. Edit rights and Role-based Edit and Access rights aren’t supported.

          Banner control supports these bindings:

          • MediaPath
          • Type
          • Visible

          Banner Filter

          To use the BannerFilter control, place filters on the LO objects after the user makes a selection. If the user doesn’t make a selection, the first element in the list is selected and an itemSelectedEvent is triggered.

          The BannerFilter element supports an optional Resource binding with target=ClearStateText. When this binding is set, the text entered in the defaultLabel is displayed after you clear the banner filter. You can specify the Default Label and LabelId values for the Resource binding.

          Property Name Description Type
          Bindings Defines the container element that contains the resources and the binding data. This property contains the filter options.
          • MediaPath—Used for the mediaPath element.
          • Type—Used for file type attachment.
          • Visible—Used for hiding the banner and all child elements.
          BannerFilter Defines the container element that contains the resources and the binding data. This property contains the list of banners. Not applicable.

          BannerFilter Control

          You can place filters on the list objects after the user makes a selection. If the user doesn’t make a selection, the first element in the list is selected and an itemSelectedEvent is triggered.

          The BannerFilter control has these attributes.

          Attribute Name Description Type
          textLines Controls the length of the text in the expanded banner filter, and truncates text by using ellipses. The supported values are 1 and 2. The default is 1. Integer
          Datasource Refers to the data source that contains the list of filter options. Integer

          BannerFilter Control Properties

          Property Name Description Type
          Bindings

          Defines the container element that contains the resources and the binding data. The BannerFilter control supports an optional binding, ClearStateText. ClearStateText displays the text in the Filter area when the Clear option is selected. The property has these attributes:

          • target
          • type
          • id
          • default label
          • bindingMode
          ClearStateText
          Events Specifies the container element that contains the name of the event, which is called in the process or framework. ItemSelectedEvent
          Items Specifies the filter items list. name

          Binding Types of the Items Property

          Binding Type Description Required
          MediaPath Used to set or configure the mediaPath element. MediaPath allows an additional attribute, roundedEdge, which specifies whether to render the attachment as is or to round the edges. The supported values are true and false. The default value is false. No
          Type Used to set or configure the attachment file type. No
          Text Used when text has to be displayed. No
          SpecialOption Used to display the clear selection. To display the Clear option in the BannerFilter control,add an LI with the property SpecialOption=Clear to the afterLoadAsync action. No

          Sample Code for Banner Control

          <UIDescription name="Order::ItemListTab" schemaVersion="0.0.0.5">
            <Page pagePattern="MasterDetailSectionPage" masterSectionFlex="60" detailSectionFlex="40" cachable="false">
              <PageHeader>
              </PageHeader>
              <Banner>
                  <Bindings>
                      <Binding bindingMode="ONE_WAY" binding="ProcessContext::SomeBo.bannerMediaPath" type="Text" target="MediaPath" />
                      <Binding bindingMode="ONE_WAY" binding="ProcessContext::SomeBo.bannerFileType" type="Text" target="Type" />
                  </Bindings> 
                  <BannerFilter textLines="2" dataSource="ProcessContext::SomeOtherBo.filterList.Items[]">
                    <Bindings>
                          <Resource target="ClearStateText" type="Label" id="ClearStateTextId" defaultLabel="..." bindingMode="ONE_TIME" />
                      </Bindings>
                      <Items name="FilterItems">
                          <Bindings>
                              <Binding bindingMode="ONE_WAY" binding=".mediaPath" type="Text" target="MediaPath" roundedEdge="true"/>
                              <Binding bindingMode="ONE_WAY" binding=".type" type="Text" target="Type" />
                              <Binding bindingMode="ONE_WAY" binding=".specialOption" type="Text" target="SpecialOption" />
                              <Binding target="Text" type="Label" binding=".actionId" />
                          </Bindings>
                      </Items>
                       <Events>
                           <ItemSelectedEvent event="filterSelected">
                               <Params>
                                   <Param name="pKey" value=".pKey" />
                               </Params>
                           </ItemSelectedEvent>
                      </Events>
                  </BannerFilter>
              </Banner>
             </Page>
          </UIDescription>
           
          Loading
          Salesforce Help | Article