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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:18:36+00:00 2026-05-17T17:18:36+00:00

I need to make a web page with Wicket that lays out the following

  • 0

I need to make a web page with Wicket that lays out the following table:

+------------+---------+
|  Category  |  Value  |
+------------+---------+
|    CatA    |  ValA   |
+------------+---------+
|    CatB    |  ValB   |
+------------+---------+
|    CatC    |  ValC   |
+------------+---------+
|    CatD    |  ValD   |
+------------+---------+
|    CatE    |  ValE   |
+------------+---------+

Every item in that table except for the headers is supposed to be a drop-down menu. There are two problems. First, each value list depends on its category list. For the sake of an easy example, CatA might contain “sports,” “cars” and “animals” as the options. Then, if “sports” is selected, ValA gets populated with “baseball,” “football” and “basketball.” But if “cars” is selected, ValA would instead get populated with “Volvo,” “Saab” and “Mercedes.”

The other problem is that rows must not appear unless the rows above them are filled in. So, when the page loads, only CatA and ValA should be visible. After ValA is filled in, CatB and ValB become visible. If ValB is filled in, then CatC and ValC appear, &c.

My question is: can this be achieved in pure Wicket, preferably asynchronously? I’ve looked through the Wicket API, but I’m not too familiar with it, so I could easily have missed the class that does what I want. My first thought involved using DropDownChoice and its onSelectionChanged() method, but that doesn’t appear to be AJAXified.

If there’s absolutely no way that this is happening with just Wicket, I’d consider using JavaScript, but that’s really a last resort.

I don’t necessarily need any code — it might not even work, since this is really stripped-down from my actual project requirements — but I would appreciate being pointed at a useful API class or an existing implementation or the like.

Edit:
Okay, donroby’s answer worked great for the first part (making values depend on categories) but I’m still lost on the second part (hiding rows until all preceding rows are filled in). At first, I thought that could be accomplished by attaching LoadableDetachableModels, but I now realize that that’s not what those do. Is there a way to toggle whether a component is on the page at all?

  • 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-17T17:18:37+00:00Added an answer on May 17, 2026 at 5:18 pm

    Some of the example code at Wicket Ajax examples may be helpful, particularly the Drop Down Choice Example.

    You can definitely do this sort of thing in Wicket by attaching Ajax behaviors and minimize the amount of JavaScript you have to write yourself in order to accomplish it.

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

Sidebar

Related Questions

I need to make a section in my web application that has multiple forms,
I'm trying to make a web page that only has content within the page
I have a section of a web page that I need to take a
We have following problem. Developers frequently need to make small changes to our web
I need to make a java applet I can embed in a web page
I need to calculate the end of scrolling on web page so that i
I have a web page that I need to check the server for an
I need to make my web page height to fit the height of the
I need to make buttons and boxes on a web page to meet a
I need to create web-page that has a button. After pressing the button 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.