Correctly editing Web GUI with Tizen









up vote
0
down vote

favorite












I am trying to build a Tizen Web Application for wearables using TAU.
I have this list:



<ul class="ui-listview" id="nearbyList">
<li class="ui-listview-divider">Nearby</li>


<li class="li-has-multiline li-has-thumb-left">
<a href="contents/place1.html">Place 1
<span class="ui-li-sub-text li-text-sub">Info 1</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/place1.png" class="ui-li-thumb-left">
</a>
</li>

<li class="li-has-multiline li-has-thumb-left">
<a href="index-old.html">Open Elements
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/open.png" class="ui-li-thumb-left">
</a>
</li>

</ul>


which I need to edit using JS with data I fetch from the web. The problem is when I try to edit the list using JQuery, it doesn't seem to work and instead renders the new elements behind the existing list. Using the debugger Menu in Tizen Studio, I can see TAU heavily edits the HTML, resulting in my #nearbyList not containing the elements I specified above, therefore JQuery adding it and TAU not acknowledging it and updating accordingly.



This is the code I try to use to add elements to the list:



$('#nearbyList').append('<li class="ui-li-grid"> <div>Finding Location</div> <div class="ui-processing"></div></li>');//processing animation


Which instead renders this:



image



This is how I initialise my scripts:



<script src="lib/jquery.min.js"></script>
<script src="js/circle-helper.js"></script>

<script src="js/app.js"></script>
<script src="js/lowBatteryCheck.js"></script>
<script src="lib/tau/wearable/js/tau.js"></script>
<script src="lib/jsSHA/sha1.js"></script>
<script src="js/web.js"></script>
<script src="js/location.js"></script>


Any help on how to correctly use JQuery with TAU to add elements to a list would be great.



Thank you.










share|improve this question

















  • 1




    Why don't you use the addItem(HTMLElement item, index) of TAU to add item ?
    – Iqbal hossain
    Nov 12 at 10:29










  • That exists?! Thank you! It would be great for you to write an answer with an example so I can upvote it.
    – Ryan_DS
    Nov 12 at 21:22










  • @Iqbalhossain I tried using .addItem as follows: imgur.com/a/3fYTh2W but it didn't seem to work correctly
    – Ryan_DS
    Nov 12 at 22:42















up vote
0
down vote

favorite












I am trying to build a Tizen Web Application for wearables using TAU.
I have this list:



<ul class="ui-listview" id="nearbyList">
<li class="ui-listview-divider">Nearby</li>


<li class="li-has-multiline li-has-thumb-left">
<a href="contents/place1.html">Place 1
<span class="ui-li-sub-text li-text-sub">Info 1</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/place1.png" class="ui-li-thumb-left">
</a>
</li>

<li class="li-has-multiline li-has-thumb-left">
<a href="index-old.html">Open Elements
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/open.png" class="ui-li-thumb-left">
</a>
</li>

</ul>


which I need to edit using JS with data I fetch from the web. The problem is when I try to edit the list using JQuery, it doesn't seem to work and instead renders the new elements behind the existing list. Using the debugger Menu in Tizen Studio, I can see TAU heavily edits the HTML, resulting in my #nearbyList not containing the elements I specified above, therefore JQuery adding it and TAU not acknowledging it and updating accordingly.



This is the code I try to use to add elements to the list:



$('#nearbyList').append('<li class="ui-li-grid"> <div>Finding Location</div> <div class="ui-processing"></div></li>');//processing animation


Which instead renders this:



image



This is how I initialise my scripts:



<script src="lib/jquery.min.js"></script>
<script src="js/circle-helper.js"></script>

<script src="js/app.js"></script>
<script src="js/lowBatteryCheck.js"></script>
<script src="lib/tau/wearable/js/tau.js"></script>
<script src="lib/jsSHA/sha1.js"></script>
<script src="js/web.js"></script>
<script src="js/location.js"></script>


Any help on how to correctly use JQuery with TAU to add elements to a list would be great.



Thank you.










share|improve this question

















  • 1




    Why don't you use the addItem(HTMLElement item, index) of TAU to add item ?
    – Iqbal hossain
    Nov 12 at 10:29










  • That exists?! Thank you! It would be great for you to write an answer with an example so I can upvote it.
    – Ryan_DS
    Nov 12 at 21:22










  • @Iqbalhossain I tried using .addItem as follows: imgur.com/a/3fYTh2W but it didn't seem to work correctly
    – Ryan_DS
    Nov 12 at 22:42













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to build a Tizen Web Application for wearables using TAU.
I have this list:



<ul class="ui-listview" id="nearbyList">
<li class="ui-listview-divider">Nearby</li>


<li class="li-has-multiline li-has-thumb-left">
<a href="contents/place1.html">Place 1
<span class="ui-li-sub-text li-text-sub">Info 1</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/place1.png" class="ui-li-thumb-left">
</a>
</li>

<li class="li-has-multiline li-has-thumb-left">
<a href="index-old.html">Open Elements
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/open.png" class="ui-li-thumb-left">
</a>
</li>

</ul>


which I need to edit using JS with data I fetch from the web. The problem is when I try to edit the list using JQuery, it doesn't seem to work and instead renders the new elements behind the existing list. Using the debugger Menu in Tizen Studio, I can see TAU heavily edits the HTML, resulting in my #nearbyList not containing the elements I specified above, therefore JQuery adding it and TAU not acknowledging it and updating accordingly.



This is the code I try to use to add elements to the list:



$('#nearbyList').append('<li class="ui-li-grid"> <div>Finding Location</div> <div class="ui-processing"></div></li>');//processing animation


Which instead renders this:



image



This is how I initialise my scripts:



<script src="lib/jquery.min.js"></script>
<script src="js/circle-helper.js"></script>

<script src="js/app.js"></script>
<script src="js/lowBatteryCheck.js"></script>
<script src="lib/tau/wearable/js/tau.js"></script>
<script src="lib/jsSHA/sha1.js"></script>
<script src="js/web.js"></script>
<script src="js/location.js"></script>


Any help on how to correctly use JQuery with TAU to add elements to a list would be great.



Thank you.










share|improve this question













I am trying to build a Tizen Web Application for wearables using TAU.
I have this list:



<ul class="ui-listview" id="nearbyList">
<li class="ui-listview-divider">Nearby</li>


<li class="li-has-multiline li-has-thumb-left">
<a href="contents/place1.html">Place 1
<span class="ui-li-sub-text li-text-sub">Info 1</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/place1.png" class="ui-li-thumb-left">
</a>
</li>

<li class="li-has-multiline li-has-thumb-left">
<a href="index-old.html">Open Elements
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<span class="ui-li-sub-text li-text-sub">xxxx</span>
<img src="../../../css/images/open.png" class="ui-li-thumb-left">
</a>
</li>

</ul>


which I need to edit using JS with data I fetch from the web. The problem is when I try to edit the list using JQuery, it doesn't seem to work and instead renders the new elements behind the existing list. Using the debugger Menu in Tizen Studio, I can see TAU heavily edits the HTML, resulting in my #nearbyList not containing the elements I specified above, therefore JQuery adding it and TAU not acknowledging it and updating accordingly.



This is the code I try to use to add elements to the list:



$('#nearbyList').append('<li class="ui-li-grid"> <div>Finding Location</div> <div class="ui-processing"></div></li>');//processing animation


Which instead renders this:



image



This is how I initialise my scripts:



<script src="lib/jquery.min.js"></script>
<script src="js/circle-helper.js"></script>

<script src="js/app.js"></script>
<script src="js/lowBatteryCheck.js"></script>
<script src="lib/tau/wearable/js/tau.js"></script>
<script src="lib/jsSHA/sha1.js"></script>
<script src="js/web.js"></script>
<script src="js/location.js"></script>


Any help on how to correctly use JQuery with TAU to add elements to a list would be great.



Thank you.







javascript tizen tizen-web-app






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 at 23:26









Ryan_DS

357116




357116







  • 1




    Why don't you use the addItem(HTMLElement item, index) of TAU to add item ?
    – Iqbal hossain
    Nov 12 at 10:29










  • That exists?! Thank you! It would be great for you to write an answer with an example so I can upvote it.
    – Ryan_DS
    Nov 12 at 21:22










  • @Iqbalhossain I tried using .addItem as follows: imgur.com/a/3fYTh2W but it didn't seem to work correctly
    – Ryan_DS
    Nov 12 at 22:42













  • 1




    Why don't you use the addItem(HTMLElement item, index) of TAU to add item ?
    – Iqbal hossain
    Nov 12 at 10:29










  • That exists?! Thank you! It would be great for you to write an answer with an example so I can upvote it.
    – Ryan_DS
    Nov 12 at 21:22










  • @Iqbalhossain I tried using .addItem as follows: imgur.com/a/3fYTh2W but it didn't seem to work correctly
    – Ryan_DS
    Nov 12 at 22:42








1




1




Why don't you use the addItem(HTMLElement item, index) of TAU to add item ?
– Iqbal hossain
Nov 12 at 10:29




Why don't you use the addItem(HTMLElement item, index) of TAU to add item ?
– Iqbal hossain
Nov 12 at 10:29












That exists?! Thank you! It would be great for you to write an answer with an example so I can upvote it.
– Ryan_DS
Nov 12 at 21:22




That exists?! Thank you! It would be great for you to write an answer with an example so I can upvote it.
– Ryan_DS
Nov 12 at 21:22












@Iqbalhossain I tried using .addItem as follows: imgur.com/a/3fYTh2W but it didn't seem to work correctly
– Ryan_DS
Nov 12 at 22:42





@Iqbalhossain I tried using .addItem as follows: imgur.com/a/3fYTh2W but it didn't seem to work correctly
– Ryan_DS
Nov 12 at 22:42













1 Answer
1






active

oldest

votes

















up vote
0
down vote













You may simply use JS to add item in list. I have create each item like below and add by a loop.



UL = document.getElementById("list");
li = document.createElement("LI");
var textnode = document.createTextNode("Title");
li.appendChild(textnode);
nodeA = document.createElement("A");
var textnode2 = document.createTextNode("Link");
nodeA.appendChild(textnode2);
span = document.createElement("SPAN");
var textnode3 = document.createTextNode("Content");
span.appendChild(textnode3);
li.appendChild(nodeA);
li.appendChild(span);
UL.appendChild(li);


It won't atleast break your TAU list.






share|improve this answer




















  • Would it still support the rotating bezel scroll and the carousel effect like a tau list? Don't see any relevant CSS classes being added
    – Ryan_DS
    Nov 13 at 23:32










  • Add class dynamically w3schools.com/howto/howto_js_add_class.asp
    – Iqbal hossain
    Nov 14 at 4:00










  • Doesn't preserve the Carousel effect from the Listview widget :/. It instead adds it to the bottom where it doesn't scroll with the rotating watch bezel and obstructs the original carousel list
    – Ryan_DS
    Nov 14 at 8:57










  • you have to add all the effect dynamically when you are adding a new item in the list
    – Iqbal hossain
    Nov 26 at 5:53










  • How would I do that?
    – Ryan_DS
    Nov 27 at 9:55










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254283%2fcorrectly-editing-web-gui-with-tizen%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













You may simply use JS to add item in list. I have create each item like below and add by a loop.



UL = document.getElementById("list");
li = document.createElement("LI");
var textnode = document.createTextNode("Title");
li.appendChild(textnode);
nodeA = document.createElement("A");
var textnode2 = document.createTextNode("Link");
nodeA.appendChild(textnode2);
span = document.createElement("SPAN");
var textnode3 = document.createTextNode("Content");
span.appendChild(textnode3);
li.appendChild(nodeA);
li.appendChild(span);
UL.appendChild(li);


It won't atleast break your TAU list.






share|improve this answer




















  • Would it still support the rotating bezel scroll and the carousel effect like a tau list? Don't see any relevant CSS classes being added
    – Ryan_DS
    Nov 13 at 23:32










  • Add class dynamically w3schools.com/howto/howto_js_add_class.asp
    – Iqbal hossain
    Nov 14 at 4:00










  • Doesn't preserve the Carousel effect from the Listview widget :/. It instead adds it to the bottom where it doesn't scroll with the rotating watch bezel and obstructs the original carousel list
    – Ryan_DS
    Nov 14 at 8:57










  • you have to add all the effect dynamically when you are adding a new item in the list
    – Iqbal hossain
    Nov 26 at 5:53










  • How would I do that?
    – Ryan_DS
    Nov 27 at 9:55














up vote
0
down vote













You may simply use JS to add item in list. I have create each item like below and add by a loop.



UL = document.getElementById("list");
li = document.createElement("LI");
var textnode = document.createTextNode("Title");
li.appendChild(textnode);
nodeA = document.createElement("A");
var textnode2 = document.createTextNode("Link");
nodeA.appendChild(textnode2);
span = document.createElement("SPAN");
var textnode3 = document.createTextNode("Content");
span.appendChild(textnode3);
li.appendChild(nodeA);
li.appendChild(span);
UL.appendChild(li);


It won't atleast break your TAU list.






share|improve this answer




















  • Would it still support the rotating bezel scroll and the carousel effect like a tau list? Don't see any relevant CSS classes being added
    – Ryan_DS
    Nov 13 at 23:32










  • Add class dynamically w3schools.com/howto/howto_js_add_class.asp
    – Iqbal hossain
    Nov 14 at 4:00










  • Doesn't preserve the Carousel effect from the Listview widget :/. It instead adds it to the bottom where it doesn't scroll with the rotating watch bezel and obstructs the original carousel list
    – Ryan_DS
    Nov 14 at 8:57










  • you have to add all the effect dynamically when you are adding a new item in the list
    – Iqbal hossain
    Nov 26 at 5:53










  • How would I do that?
    – Ryan_DS
    Nov 27 at 9:55












up vote
0
down vote










up vote
0
down vote









You may simply use JS to add item in list. I have create each item like below and add by a loop.



UL = document.getElementById("list");
li = document.createElement("LI");
var textnode = document.createTextNode("Title");
li.appendChild(textnode);
nodeA = document.createElement("A");
var textnode2 = document.createTextNode("Link");
nodeA.appendChild(textnode2);
span = document.createElement("SPAN");
var textnode3 = document.createTextNode("Content");
span.appendChild(textnode3);
li.appendChild(nodeA);
li.appendChild(span);
UL.appendChild(li);


It won't atleast break your TAU list.






share|improve this answer












You may simply use JS to add item in list. I have create each item like below and add by a loop.



UL = document.getElementById("list");
li = document.createElement("LI");
var textnode = document.createTextNode("Title");
li.appendChild(textnode);
nodeA = document.createElement("A");
var textnode2 = document.createTextNode("Link");
nodeA.appendChild(textnode2);
span = document.createElement("SPAN");
var textnode3 = document.createTextNode("Content");
span.appendChild(textnode3);
li.appendChild(nodeA);
li.appendChild(span);
UL.appendChild(li);


It won't atleast break your TAU list.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 at 9:56









Iqbal hossain

1,27021018




1,27021018











  • Would it still support the rotating bezel scroll and the carousel effect like a tau list? Don't see any relevant CSS classes being added
    – Ryan_DS
    Nov 13 at 23:32










  • Add class dynamically w3schools.com/howto/howto_js_add_class.asp
    – Iqbal hossain
    Nov 14 at 4:00










  • Doesn't preserve the Carousel effect from the Listview widget :/. It instead adds it to the bottom where it doesn't scroll with the rotating watch bezel and obstructs the original carousel list
    – Ryan_DS
    Nov 14 at 8:57










  • you have to add all the effect dynamically when you are adding a new item in the list
    – Iqbal hossain
    Nov 26 at 5:53










  • How would I do that?
    – Ryan_DS
    Nov 27 at 9:55
















  • Would it still support the rotating bezel scroll and the carousel effect like a tau list? Don't see any relevant CSS classes being added
    – Ryan_DS
    Nov 13 at 23:32










  • Add class dynamically w3schools.com/howto/howto_js_add_class.asp
    – Iqbal hossain
    Nov 14 at 4:00










  • Doesn't preserve the Carousel effect from the Listview widget :/. It instead adds it to the bottom where it doesn't scroll with the rotating watch bezel and obstructs the original carousel list
    – Ryan_DS
    Nov 14 at 8:57










  • you have to add all the effect dynamically when you are adding a new item in the list
    – Iqbal hossain
    Nov 26 at 5:53










  • How would I do that?
    – Ryan_DS
    Nov 27 at 9:55















Would it still support the rotating bezel scroll and the carousel effect like a tau list? Don't see any relevant CSS classes being added
– Ryan_DS
Nov 13 at 23:32




Would it still support the rotating bezel scroll and the carousel effect like a tau list? Don't see any relevant CSS classes being added
– Ryan_DS
Nov 13 at 23:32












Add class dynamically w3schools.com/howto/howto_js_add_class.asp
– Iqbal hossain
Nov 14 at 4:00




Add class dynamically w3schools.com/howto/howto_js_add_class.asp
– Iqbal hossain
Nov 14 at 4:00












Doesn't preserve the Carousel effect from the Listview widget :/. It instead adds it to the bottom where it doesn't scroll with the rotating watch bezel and obstructs the original carousel list
– Ryan_DS
Nov 14 at 8:57




Doesn't preserve the Carousel effect from the Listview widget :/. It instead adds it to the bottom where it doesn't scroll with the rotating watch bezel and obstructs the original carousel list
– Ryan_DS
Nov 14 at 8:57












you have to add all the effect dynamically when you are adding a new item in the list
– Iqbal hossain
Nov 26 at 5:53




you have to add all the effect dynamically when you are adding a new item in the list
– Iqbal hossain
Nov 26 at 5:53












How would I do that?
– Ryan_DS
Nov 27 at 9:55




How would I do that?
– Ryan_DS
Nov 27 at 9:55

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254283%2fcorrectly-editing-web-gui-with-tizen%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

Museum of Modern and Contemporary Art of Trento and Rovereto