Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 893685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:15:39+00:00 2026-05-15T14:15:39+00:00

I am retrieving a list of objects from json url and displaying it like

  • 0

I am retrieving a list of objects from json url and displaying it like a list by adding a label field and a seperator. Now, i want to make each label clickable so that each label redirects to a seperate url. On clicking the label a seperate screen must open with the json data of the corresponding url. So, can anyone tell me how to achieve this. I wil be really grateful if i get some sample code of how to do it… Here’s some sample code that i have done…

public VerticalFieldManager showShoppingList(){
        try {
            jsArrShpList=new JSONArray(strShopping);
            totalList= jsArrShpList.length();
            for(int i=0;i<totalList;i++){
                 String strAlert=jsArrShpList.get(i).toString();
                 JSONObject joAlert=new JSONObject(strAlert);
                 String shoppingList = joAlert.get("CategoryName").toString();
                 LabelField shops  = new LabelField(shoppingList);
                 VerticalFieldManager vfmListRow=new VerticalFieldManager();
                 vfmListRow.add(shops);
                 vfmListRow.add(new SeparatorField());
                 vfmShpList.add(vfmListRow);

            }

            return vfmShpList;
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:15:40+00:00Added an answer on May 15, 2026 at 2:15 pm

    Instead of using a bunch of LabelFields which don’t normally accept focus or click events, why not use a ListField on the screen? That seems to be more of what you’re looking for.

    If you do want to go with the LabelField approach, you’ll need to do a few things. First, when you create your LabelField, use the Field.FOCUSABLE style so that it will accept focus:

    LabelField shops  = new LabelField(shoppingList, Field.FOCUSABLE);
    

    Now, since the LabelField field won’t call into a change listener if you set one up, you’ll need to listen for click and key events in it’s parent manager. Since these click or key events can be for any field in the manager, you need to check which field is in focus when the event occurs, and run any appropriate handler based on the field in focus.

    Code example:

    VerticalFieldManager vfmListRow = new VerticalFieldManager() {
        protected boolean navigationClick(int status, int time) {
            Field field = getFieldWithFocus();
            if (field != null && field.equals(shops)) {
                System.out.println("shops field clicked");
                return true;
            }
            return super.navigationClick(status, time);
        }
    
        protected boolean keyChar(char key, int status, int time) {
            Field field = getFieldWithFocus();
            if (key == Characters.ENTER && field != null && field.equals(shops)) {
                System.out.println("shops field clicked");
                return true;
            }
            return super.keyChar(key, status, time);
        }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the following code, I'm retrieving a list of Integers from a DB and
When retrieving objects from an NSMutableArray in cocoa-touch is the below code ok? Should
I need to return a list of objects from a restful webservice. each object
I am retrieving a list of objects in hibernate using Criteria API. However I
I am having a problem while retrieving data from an ArrayList and displaying them
I am having a little trouble retrieving the values from a JSON object that
I am connecting to CRM with the intention of retrieving a list of picklist
I'm retrieving an IEnumerable list of properties via following code: BindingFlags bindingFlag = BindingFlags.Instance
When retrieving a lookup code value from a table, some folks do this... Dim
When retrieving values from a DataRow is it better to use the column name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.