Note that there are some explanatory texts on larger screens.

plurals
  1. POPopulate List based on json data in Worklight Application
    primarykey
    data
    text
    <p>i am developing a Worklight application using DOJO which shows list data based on webservice response.For getting webservice response i have created an adapter,i tested the adapter and its working fine.My problem is to show this json data on another view ,also in the new view i taught of showing this data in a list(list should populate based on json data array length) so that if i click on a list it will show that details.</p> <p>How to do this .Any help is appreciated.</p> <p>Code.</p> <p>.js</p> <pre><code>function dispData() { var invocationData = { adapter : 'getSampleAdapter', procedure : 'sample' }; WL.Client.invokeProcedure(invocationData,{ onSuccess : Success, onFailure : Failure, }); } function Success(result) { var httpStatusCode = result.status; if (200 == httpStatusCode) { dijit.registry.byId("view0").performTransition("view1", 1, "slide"); } } </code></pre> <p>html file</p> <pre><code>&lt;div data-dojo-type="dojox.mobile.ScrollableView" id="view0" data-dojo-props="selected:false,scrollDir:'v'"&gt; &lt;div data-dojo-type="dojox.mobile.Heading" data-dojo-props="label:'Status'"&gt;&lt;/div&gt; &lt;button data-dojo-type="dojox.mobile.Button" style="margin-left: 38%; margin-top: 30%" data-dojo-props="label:'Data Details', onClick:function(e){dispData();}" &gt;&lt;/button&gt; &lt;/div&gt; &lt;div data-dojo-type="dojox.mobile.ScrollableView" id="view1" data-dojo-props="selected:false,scrollDir:'v'"&gt; &lt;div data-dojo-type="dojox.mobile.Heading" data-dojo-props="label:'Data'" back="Status" moveTo="view0"&gt;&lt;/div&gt; ----------Json Data Should display here-------- &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload