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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:35:15+00:00 2026-05-24T04:35:15+00:00

1) I am using a ListView to populate some 2 labels from database. The

  • 0

1) I am using a ListView to populate some 2 labels from database. The table has 100 rows so I get 100 <TD>s. This works fine.

this.selectView = new PageableListView("selectedBG", new PropertyModel(this, "selectedList"), 10) {

private static final long serialVersionUID = 1L;

@Override
protected void populateItem(final ListItem item){
    selParentGclOrg = new Label("selParGclOrgId", new PropertyModel(gclOrg, "parentGclOrgId"));
    selParentGclOrg.setOutputMarkupId(true);

    final AjaxLink ajl = new AjaxLink("clickMe"){
        public void onClick(AjaxRequestTarget target){
            chilgGcl = gclOrg.getGclOrgId();
            selectPopUp.show(target);
        }
    };

    ajl.add(selParentGclOrg);
    final Label lblGclOrg = new Label("selGclOrgId", Integer.valueOf(gclOrg.getGclOrgId()).toString());

    item.add(ajl);
    item.add(lblGclOrg);
}
}

2) One label is hyperlinked and opens a popup window from which I can select possible values for label 2. The popup window opens perfectly.

selectPopUp = new select_popUP("showModal",container){
        @Override
        public void onSelect(AjaxRequestTarget target, int gclOrgId){
            selParentGclOrg.setModelObject(Integer.toString(gclOrgId));
            target.addComponent(selectView);
            close(target);
        }

        @Override
        public void onCancel(AjaxRequestTarget target){
            close(target);
        }
    };

3) In the popup window, possible values are hyperlinked. Clicking on it closes the popup window and sends the possible value to the main page. This works ok… I think.

4) The new value is assigned to Label 2 using:

target.addComponent(selectView);

This is where I am getting stuck. Wicket is supposed to change the label on the same row (at least, I think) but it’s updating the Label 2 of the last row.

What am I doing wrong?

  • 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-05-24T04:35:16+00:00Added an answer on May 24, 2026 at 4:35 am

    I think the relevant parts of your code are missing from the post…
    Like:

    • where gclOrg is set
    • where selParentGclOrgis set for the ModalWindow

    Judging from what I can see, I would put my bet on an issue with populateItem beeing run way after the rest of the code in your class… Most of your code will be run on constructor time or onBeforeRender, populateItem will be called sometimes during rendering… But that’s just a wild guess.

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

Sidebar

Related Questions

I have a listview that's populated by rows that get their data from a
i want to display some information in a listview using the GridView. i have
I'm using the new ASP.Net ListView control to list database items that will be
I'm using the following code to populate listview Oncreate method: SimpleAdapter adapter = new
I am using a listview, and trying to populate using a file. I need
I'm using a custom ListView which has several TextView objects in each row. in
I'm using some reflection to set up a ListView made up of custom views.
I'm using the ListView control (ASP.NET 2008) to show a bunch of lines of
I'm using a ListView in C# to make a grid. I would like to
I am using the ListView Control with the following datasource List<MyObject> On my listview

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.