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 8493315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:58:15+00:00 2026-06-10T22:58:15+00:00

Hey I am trying to store some values in a hashmap to put into

  • 0

Hey I am trying to store some values in a hashmap to put into a customized view.
the problem is when assigning keys in the put method of my hashmap I get an error when I try to get the key from a variable within an object that is withing my other object

here is my code:

     ListView lv= (ListView)findViewById(R.id.listView1);
     String[] from = new String[] {"fornavn", "starttid", "sluttid"};
     int[] to = new int[] { R.id.Kunde, R.id.StartTime, R.id.EndTime };     

     List<HashMap<String, String>> fillMaps = new ArrayList<HashMap<String, String>>(); 

     for(Appointment a : todayList)     {

        HashMap<String, String> map = new HashMap<String, String>();

            //here is my error I don't know what to put as key??
        map.put("kunde.fornavn", "col_1_item_" + a.kunde.fornavn);
        map.put("starttid", "col_2_item_" + String.valueOf(a.startTime));
        map.put("sluttid", "col_3_item_" + String.valueOf(a.endTime));
        fillMaps.add(map);

     }
     SimpleAdapter adapter = new SimpleAdapter(this, fillMaps, R.layout.row, from, to);
     lv.setAdapter(adapter);

logCat:

LogcatInfo

  • 1 1 Answer
  • 0 Views
  • 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-06-10T22:58:16+00:00Added an answer on June 10, 2026 at 10:58 pm

    It would seem that

    a.kunde
    

    is null

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey I was trying to call a script to made some changes to an
Hey basically Im trying to store a solution and create a vector of these.
Hey there! I'm doing this project and right now I'm trying to: create some
Hey guys im having a problem trying to program out a set of logic.
Hey guys I'm new in php and I'm trying to store the numbers from
Hey so i'm trying to get addstr() in the pdCurses library to work (windows
Hey trying to get a validation check working on a boolean field called 'activated'.
Hey I'm trying to load a Lua file into my c++ project but there
Hey I'm trying to learn some of the recommendation algorithms that's being used in
Hey im trying to store a string from a selected item in a datagrid

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.