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

  • Home
  • SEARCH
  • 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 6162069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:35:26+00:00 2026-05-23T21:35:26+00:00

The problem described below relates to an inventory tracking Java program. There are multiple

  • 0

The problem described below relates to an inventory tracking Java program. There are multiple classes of inventory item and it is not possible to determine up front what properties of the intentory class are being tracked. Taking two classes for example:

InventoryClassOne {
  String name;
  Double price
}
InventoryClassTwo {
  StockStatus status;
  Long Quantity
}.

Storing the data is no problem, I can just define a

class InventoryProperty<T> {
  T value;
} 

and a

class InventoryClass {
  Map<String, InventoryProperty<?>> inventoryPropertyMap;
}

The UI will be developed using the Wicket framework. I want to provide the administrator of the application with a means of adding new InventoryClasses and defining how the data gets laid out (tabular, list, etc…) on a per InventoryClass basis. Has anyone ever solved this type of problem before? What design patterns are available for achieving this. I don’t even know what words to type into Google in order get ideas for how to solve this.

  • 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-23T21:35:26+00:00Added an answer on May 23, 2026 at 9:35 pm

    As much as I love Wicket, I really don’t think it is the best option for this kind of meta-website.

    But if I absolutely had to do it in Wicket, this is what I’d do:

    1. Create a Fragment for each basic UI widget.
    2. On the admin page you create a mapping from each field of your inventory class to a pre-fab fragment. (You’ll have to use reflection to query what fields are available.)
    3. When you’re constructing your UI page, you create a repeater (a ListView for example, but even a simple repeater will do) which for each entry in your Field->Fragment mapping adds the fragment with a model pointing at the field.

    You might need to tweak it a bit, especially with tables but this is the basic idea.

    However, and I have to repeat this, you’re practically losing most of the advantages of Wicket, even worse, you’ll have to put extra effort in to work your way around (or against) Wicket. It just doesn’t seem to be worth it.

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

Sidebar

Related Questions

Here is my current question: I'm guessing that my problem (described below) is being
I have the same problem as described in the posts listed below. That is,
Please help with my problem described below: var Land = function(){ this.cities = [];
I'm in search of an algorithm, which can handle the problem described below. I
I have trouble to figure out a php problem described below. I have one
The problem is described in the subj.; Here's my code below: CGColorSpaceRef colorSpace =
I have a problem with the load function described below. For some reason even
I have a problem in php/linux, described below: I have to execute a linux
I'm having the problem described here: http://groups.google.com/group/microsoft.public.xml.soap/browse_thread/thread/029ee5b5d4fa2440/0895d73c5c3720a1 I am consuming a Web Service using
Problem is described and demonstrated on the following links: Paul Stovell WPF: Blurry Text

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.