Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3548

Issues in sap.m.MultiInput enablemultilinemode

$
0
0

Hi All,

 

I am trying to use MultiInput UI new feature "Copy Paste from excel".

 

i followed SAPUI5 Explored to implement the same.

 

But i am getting "Uncaught ReferenceError: Token is not defined" error while using setToken method.

 

Any help is appreciated.

 

Controller Init method:

var oModel = new sap.ui.model.json.JSONModel("model/Product.json");
this.getView().setModel(oModel);
var oView = this.getView();

 

 

var oMultiInput1 = sap.ui.getCore().byId("MulInp");
oMultiInput1.setTokens([
                        new Token({text: "Token 1", key: "0001"}),
      new Token({text: "Token 2", key: "0002"}),
      new Token({text: "Token 3", key: "0003"}),
      new Token({text: "Token 4", key: "0004"}),
      new Token({text: "Token 5", key: "0005"}),
      new Token({text: "Token 6", key: "0006"})
      ]);
//*** add checkbox validator
oMultiInput1.addValidator(function(args){
var text = args.text;
return new Token({key: text, text: text});
});

 

Regards,

Satish


Viewing all articles
Browse latest Browse all 3548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>