Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Tokens rendering in Single line without break in mobile: sap.m.Tokenizer

Experts,

  I am trying to display the tokens with line break. I have a drop down box and the values selected are put in JSON model and pushed as tokens in the UI.

Code :

<FlexBox

          alignItems="Start" displayInline="false" fitContainer="false" >

          <items>

       

  <Tokenizer  id="Token1" size="2em" scrollWidth="50px"

        tokens="{/mydata}">

       

        <Token  text="{Name}"  />

       

        </Tokenizer>

      

  </items>

          </FlexBox>

In controller I have,

var sel1 = this.getView().byId("select1").getSelectedKey();

      Datalist.mydata.push({Name:sel1});

      var mymodel= new sap.ui.model.json.JSONModel(Datalist);

  this.getView().byId("Token1").setModel(mymodel);

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question