Adding additional components to a web page after rendering by Wicket
- by Andrew Fielden
I have a requirement to create a web page using Wicket 1.5, which can present a variable number of panels to capture user input. All the panels have the same structure.
The page would start off with one panel, and includes a button to dynamically add more as required.
So the number of panels is unknown at the time the page is initially rendered. Effectively I'd be altering the structure of the page dynamically. This is possible in Javascript, using document.addElement()
I've done a similar thing in the past by creating all the components on page load, and selectively showing/hiding components.
The difference here is that the number of components (panels) is initially unknown. I'm unsure as to how this would be achieved with Wicket.