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" />
<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>
</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
