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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:49:35+00:00 2026-06-09T21:49:35+00:00

I have the following classes: public class Group { private long id; private String

  • 0

I have the following classes:

public class Group {
    private long id;
    private String name;
    ...
    private List<Person> members;
}

public class Person {
    private long id;
    private String name;
    private String comments;
}

I have the following wicket panel:

<wicket:panel>
   <div>
     <!-- Group data -->
   </div>
   <form wicket:id="group">
   <table>
      <tbody wicket:id="container">
         <tr wicket:id="members">
             <td wicket:id="personId"></td>
             <td wicket:id="name"></td>
             <td><input type="text" name="comments" wicket:id="comments" value="" /></td>
         </tr>
      </tbody>
   </table>
   <input type="submit" value="save" >
   </form>      
</wicket:panel>

In the other hand, I have a WebPage that have filtering functions and show me the differents groups:

<html>
<body>
   <form wicket:id="filterOptions">
     <!-- filter options -->
   </form>
   <div wicket:id="resultingGroups">
       <!-- contains the groups that matching the filters -->
   </div>
</body>
</html>

I want to update the groups doing ajax submits. I tried using ListView, but, I dont know why, when I click ‘save’ button the changes are reflected on in the first group panel, if I update any other group and click ‘save’ the Group object is not updated.

I research a lot and found that ListView is not a good choice for what I want to do, but I don’t know which View is the correct one.

Filter form works with ajax button too, and works fine.

I am very new on Wicket.

Thanks in advance!!

  • 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-09T21:49:37+00:00Added an answer on June 9, 2026 at 9:49 pm

    Actually ListView, DataView and other repeaters are good for what you want to do.

    • the ListView should be populated by a Model with a collection of the items you want
        ListModel peopleModel = //... DAO access (database) 
        ListView peopleList = new ListView("resultingGroups", peopleModel){ ... };
    
    • in order to repaint (refresh the ListView) you should enclose peopleList in a container with the .setOutputMarkupId(true); (so that Wicket is able to find that container through ajax).
    ...
        WebMarkupContainer peopleContainer = new WebMarkupContainer("container");
        peopleContainer.setOutputMarkupId(true);
        peopleContainer.add(peopleList);
    ...
    
    • …and then whenever you want to refresh the results shown in the List you need to set the new results to the model (peopleModel) and repaint the container that has the ListView ((*))
    public void onEvent(AjaxRequestTarget target) {
        //... on button click or something
        newPeopleList = // ... DAO
        peopleModel.setObject(newPeopleList);
    
        target.add(peopleContainer); // (*) repaint
    }
    

    Hope that helped. More examples here

    https://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html

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

Sidebar

Related Questions

Let's say I have the following classes : public class MyProductCode { private String
I have the following classes: public class Person { public String FirstName { set;
I have following classes public class Person { public string FirstName { get; set;
I have the following classes: Public Class Email Private Shared ReadOnly EMAIL_REGEX = \b[a-zA-Z]+[a-zA-Z0-9._+-]+@
I have the following two classes: public class Address { public string AddressLine1 {
I have the following classes [XmlRoot] public class AList { public List<B> ListOfBs {get;
I have the following classes: public class MyItems : List<MyItem> { ... } public
I have the following classes: public class Folder{ private Set<Documents> documents; private Set<Clip> clips;
Say I have the following classes: public class A { public string x; }
I have the following classes: public class Person { [Key] public Guid Id {

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.