no, this will not work. form component's that are not visible are also not updated.

-Igor


On 4/3/06, Bennett, Timothy (JIS - Applications) < [EMAIL PROTECTED]> wrote:
Michael Jouravlev's Wicket Wizard code renders a whole set of panels (as part of the wizard) and then uses a construct like:
 
    public void updatePanels() {
        log.info("--> wizard.updatePanels, step name: " +
                 (wizard != null ? wizard.getCurrentStepName() : "null"));
 
        for (int i = 0; i < wizardPanels.length; i++) {
            wizardPanels[i].setVisible(
                wizard != null &&
                ("wp"+i).equals(wizard.getCurrentStepName())
            );
        }
    }
 
To set the panel visibility flag for the selected panel... thinking I could use something like this in a modified TabbedPanel component that is form friendly...

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Igor Vaynberg
Sent: Monday, April 03, 2006 12:19 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Validations and the TabbedPanel

tabbedpanel isnt really meant to be used to cover up form components, so you are right, what you need is a tabbedpanel that uses dhtml instead of a server roundtrip.

-Igor


On 4/3/06, Bennett, Timothy (JIS - Applications) <[EMAIL PROTECTED]> wrote:
Wicketeers,
 
I'm using the TabbedPanel component in a Wicket 1.1.1 application.  Works great in a read-only view mode of my data, but using the TabbedPanel to present a create/edit form for my data is proving to be a bit problematic.  One big issue I'm having is that the validators of my form components are only firing for the components that are part of the "currently selected" tab panel.  The reason is because the TabbedPanel only renders the content of the selected tab, instead of doing some show/hide magic with all the tabbed panels.
 
Markup for my page looks basically like:
 
<form wicket:id="form>
   <input wicket:id="save" type="image" src="" border="0" hspace="6" />
   <input wicket:id="cancel" type="image" src="" border="0" value="Cancel" hspace="6" />
   <span wicket:id="tabs" class="tabpanel">[tabbed panel will be here]</span>
</form>
 
As you can see, the TabbedPanel is inside a single form.  I need validations to fire on all the component in all the tab panels, not just the rendered panel.  My plan is to extend/modify/evolve the TabbedPanel component to (something like a TabbedFormPanel component) that effectively employs some show/hide magic so that all the panels are available in the form for validation.
 
Does this sound like the right approach, or am I missing something that would be simpler but accomplish the same thing...
 
Thanks in advance,
Timothy


Reply via email to