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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:14:45+00:00 2026-05-26T23:14:45+00:00

i am working on wicket, where i am supposed to show my data’s under

  • 0

i am working on wicket, where i am supposed to show my data’s under

<tr>
   <td>Name</td>
   <td>Single Player Score</td>
   <td>Double Player Score</td>
   <td>Total Score</td>
</tr>
<tr wicket:id="data">
   <td wicket:id="name"></td>
   <td wicket:id="singlePlayerScore"></td>
   <td wicket:id="doublePlayerScore"></td>
   <td wicket:id="totalScore"></td>
</tr>

My Player model class is as:
Player class with attributes singlePlayerScore, doublePlayerScore(), name with getter and setter and also a list data obtained from database.

Data from SQLQuery is as;

name        score    gamemode
  A           200       singlePlayerMode 
  A           100       doublePLayerMode
  B           400       singlePlayerMode 
  B           300       doublePLayerMode
dataList == player.getScoreList();

My PageableListView is as:

     final PageableListView listView = new PageableListView("data",dataList,10){
@Override
protected void populateItem(Item item){
    player = (Player)item.getModelObject();
    item.add(Label("name",player.getName()));
    item.add(Label("singlePlayerScore",player.getName()));
    item.add(Label("doublePlayerScore",player.getName()));
    item.add(Label("totalScore",String.valueOf(player.getSinglePlayerScore()+player.getDoublePlayerScore())));
  }
}

My Problem is as:
What view i get is as:

Name         single Player Score               Double Player Score       Total Score
A              0                                  100                      100
A              200                                 0                       200
B              0                                   300                     300
B              400                                  0                      400

How do i achieve below view on my webpage?

 Name         single Player Score               Double Player Score       Total Score
    A              200                                  100                     300
    B              400                                  300                     700

Please help me as to why is this happening?
I guess my list has size four that’s one reason why as to it is rendering the view?
So what can i do to get as require rendering view?

  • 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-26T23:14:46+00:00Added an answer on May 26, 2026 at 11:14 pm

    You have to edit your SQL query to something like this:

    SELECT 
        name, 
        sum(singleplayerscore), 
        sum(doubleplayerscore), 
        (sum(singleplayerscore) + sum(doubleplayerscore)) AS totalscore 
    FROM `scorelist` GROUP BY name
    

    This way the scores adds up for each player (column name) and creates an additional column, totalscore, with the total score.

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

Sidebar

Related Questions

I am working on wicket. I used a checkbox for every row in a
Working on a Wicket application that adds markup to the DOM after onLoad via
I'm working on an Apache Wicket project in Eclipse with Maven2 -- my SCM
I am currently working on a web app using Wicket and started using jQuery
is there any working, supported and maintained scaffolding solution for Wicket 1.5? I know
I'm working on a web application with Wicket, Spring and Hibernate and I've come
I'm working on porting part of an existing Spring MVC application over to Wicket.
I've been trying to get wicket and guice working together, more specifically injecting a
I just checked out my (working) wicket project to a new development machine and
I am new to Wicket and working on an existing project. How do I

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.