Note that there are some explanatory texts on larger screens.

plurals
  1. POPass json result to sencha touch
    primarykey
    data
    text
    <p>I am new for sencha touch. I need to pass json data by using RESTful architectural .But I dun has any Idea how to start it.Can anyone guild me some example? Btw I am using JACKSON library.</p> <p>Here is my java file - jsonTest.java</p> <pre><code> package jsonTest; import java.io.File; import java.io.IOException; import java.util.Map; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.codehaus.jackson.JsonEncoding; import org.codehaus.jackson.JsonFactory; import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.JsonGenerator; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import com.sun.xml.internal.bind.api.TypeReference; public class jsonTest { private static List&lt;String&gt; countries; private static List&lt;String&gt; tags; public static void main(String[] args) { String data = "Afghanistan, Albania, Algeria, Andorra, Angola, Antigua &amp; Deps,"+ "United Kingdom,United States,Uruguay,Uzbekistan,Vanuatu,Vatican City,Venezuela,Vietnam,Yemen,Zambia,Zimbabwe"; countries = new ArrayList&lt;String&gt;(); StringTokenizer st = new StringTokenizer(data, ","); //Parse the country CSV list and set as Array while(st.hasMoreTokens()) { countries.add(st.nextToken().trim()); } String strTags = "SharePoint, Spring, Struts, Java, JQuery, ASP, PHP, JavaScript, MySQL, ASP, .NET"; tags = new ArrayList&lt;String&gt;(); StringTokenizer st2 = new StringTokenizer(strTags, ","); //Parse the tags CSV list and set as Array while(st2.hasMoreTokens()) { tags.add(st2.nextToken().trim()); } } public List&lt;String&gt; getCountryList(String query) { String country = null; query = query.toLowerCase(); List&lt;String&gt; matched = new ArrayList&lt;String&gt;(); for(int i=0; i &lt; countries.size(); i++) { country = countries.get(i).toLowerCase(); if(country.startsWith(query)) { matched.add(countries.get(i)); } } return matched; } public List&lt;String&gt; getTechList(String query) { String country = null; query = query.toLowerCase(); List&lt;String&gt; matched = new ArrayList&lt;String&gt;(); for(int i=0; i &lt; tags.size(); i++) { country = tags.get(i).toLowerCase(); if(country.startsWith(query)) { matched.add(tags.get(i)); } } return matched; } } </code></pre> <p>How can I show the result to my sencha touch project?By using list or panel?</p>
    singulars
    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.
 

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