on 04-12-2018 10:39 AM
Hi,
I am working on SAPUI5. I have json data with three text fields. If I click on a link on table, it should copy JSON data. and we can paste it anywhere. How to do this in sapui5?
Hi,
Below code will work for you.
function myFunction() {
var copyText = document.createElement("input");
copyText.value = "Your text here";
document.body.appendChild(copyText);
copyText.select();
document.execCommand("Copy");
alert("Copied the text: " + copyText.value);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for tutorial ....
Hello Preety,
Could you provide us with some more details on what you are trying to do? Do you want to display data from a JSON model in a table, copy it to some other place? It is not clear from the description what you really want to do. The SAPUI5 version and controls you are using are also useful to help you.
Best regards,
Désirée
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.