on ‎2016 Feb 08 2:06 PM
Hi Experts,
I want to use multiinput with the functionality that if i press enter a new token gets added . Also I need to bind it to odata so that if anything is already saved then that should flow while rendering and If user enter something new , that should also gets saved.
Examples which I have seen are not adding new token after pressing enter with data binding.
Can you please help me out?
Thanks,
Mansi
Request clarification before answering.
Please refer the example document. it may be useful document
<!DOCTYPE html>
<html>
<head>
<script src="src='/sapui5-internal/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"></script>
<meta charset="utf-8">
<title>MultiInput</title>
<script>
var oInput = new sap.m.MultiInput({
tokens : [
new sap.m.Token({
key : "1",
text : "Token1"
}),
new sap.m.Token({
key : "2",
text : "Token2"
}),
new sap.m.Token({
key : "3",
text : "Token3"
})
]
});
oInput.placeAt('content');
</script>
</head>
<body class='sapUiBody'>
<div id='content'></div>
</body>
Kindly let me know if you need any more information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sai's example is more than enough .
Meanwhile you can refer this link too... http://jsbin.com/nehaqu/edit?html,js,output
Regards,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mansi,
Will this sample help? Plunker
1. Try to give some product name in the input and click on enter, then a token will be added to MultiInput.
2. Click on 'Check Model' button to read the model data.
3. Instead of OData model, I used a JSON model.
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.