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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:46:29+00:00 2026-06-05T10:46:29+00:00

When I debug List says, indirect list not instantiated. But I get it fetched

  • 0

When I debug List says, indirect list not instantiated. But I get it fetched lazy in JPA. It is not rendering in Listview but it should have nodes on it. Am I missing something?

//.....code......
private ListView<String> reqs; // Requirements
private Label lblreqs;  //Label for repeat requirements
//...code...
    final LigaBaseball lbb = LigaBBServ.buscarPorID(Integer
            .parseInt(idLiga)); //Get Baseball league from database

    if (lbb == null || pageParameters == null
            || pageParameters.get("idLiga") == null)
        throw new RestartResponseException(VerLigas.class); //If null redirect.
//...code...

    add(reqs = new ListView<String>("reqs", new ListModel<String>(lbb.getRequisitos()))//LAZYly get List from LigaBaseball(BaseballLeague) {
        @Override
        protected void populateItem(ListItem<String> item) {
        /*When I debug item is null
*/
            item.add(lblreqs = new Label("lblreqs", (item.getModelObject())));
        }
    });

//...code...
  • 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-05T10:46:30+00:00Added an answer on June 5, 2026 at 10:46 am

    Well… according to this (rather minimalist) UnitTest created from your posted code, it does, but maybe I’m missing the point…

    package net.unbewaff;
    
    public class DemoTestCase {
    
        private WicketTester tester = new WicketTester();
        private Panel panel = new MyPanel("panel");
    
        @Test
        public void testIt() {
            tester.startComponentInPage(panel);
            tester.assertComponent("panel", Panel.class);
            tester.assertComponent("panel:reqs", ListView.class);
            tester.assertComponent("panel:reqs:0", ListItem.class);
            tester.assertLabel("panel:reqs:0:lblreqs", "1");
            tester.assertComponent("panel:reqs:1", ListItem.class);
            tester.assertLabel("panel:reqs:1:lblreqs", "2");
            tester.assertComponent("panel:reqs:2", ListItem.class);
            tester.assertLabel("panel:reqs:2:lblreqs", "3");
            tester.assertComponent("panel:reqs:3", ListItem.class);
            tester.assertLabel("panel:reqs:3:lblreqs", "4");
        }
    
        private final class MyPanel extends Panel {
    
            private MyPanel(String id) {
                super(id);
            }
    
            public void onInitialize() {
                ListView<String> reqs;
    
                final LigaBaseball lbb = new LigaBaseball();
    
                reqs = new ListView<String>("reqs", new ListModel<String>(lbb.getRequisitos())) {
    
                    protected void populateItem(ListItem<String> item) {
                        item.add(new Label("lblreqs", (item.getModelObject())));
                    }
                };
    
                add(reqs);
    
                super.onInitialize();
            }
        }
    
        class LigaBaseball {
    
            public List<String> getRequisitos() {
                String[] a = { "1", "2", "3", "4" };
                return Arrays.asList(a);
            }
        }
    }
    

    Test set: net.unbewaff.DemoTestCase

    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec

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

Sidebar

Related Questions

Python list comprehensions are nice, but near impossible to debug. You guys have any
I have a list of files (in array): C:\Data\..\Users\admin\history.dat C:\\Users\admin\..\user\history.dat C:\Users\..\Data\debug.log How can I
I try to iterate over each item in the list. But iterator does not
Debug.startMethodTracing() by default uses an 8MB buffer size. I have a number of questions
Debug HTTP is easy, you have all sort of tools to do it (like
To debug our Android code we have put System.out.println(string) which will let us know
I'm trying to get the GKTank example working with 2 iPhones. Both have bluetooth
The code works fine in Firefox, but not in IE8. I'm getting an error:
I have changes the code but the issue is still there CandidateResumeInfo candidateResumeInfo =
I have 2 views that show lists that then uses a mediator to get

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.