if elements are not visible they are not validated
so what you have to do is not allow the user to switch between tabs unless
everything on that tab has validated. you can do this by overriding the
linkfactory on the tabbed panel, using a submitlink, and only calling
setactivetab on the panel if everything has passed validation
if that is unacceptable - you want the user to roam freely from tab to tab:
a better option for these situations imho is to not to use a serverside
tabpanel, but a clientside one. that way your entire form is written out and
the submit button submits the entire thing. a js lib like this makes it
trivial: http://www.stilbuero.de/jquery/tabs/
-igor
On 3/13/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote:
On Monday, 12 March 2007 04:37 pm, Jean-Baptiste Quenot escreveu:
> * Thomas R. Corbin:
> > or do you need to have each tab have it's own form?
> >
> > And if each tab has it's own form, does the user need to save
> > their data before switching tabs?
> >
> > Would the submit button be on each form, on each tab, or outside
> > the tabs entirely?
>
> If all the tab's contents are generated in the page, you can put
> the form around all the tabs, so that each tab can contribute its
> respective input fields. Otherwise, if tab contents are only
> rendered after an Ajax callback, you'd be safer putting a form
> inside every tab.
How do you get all the tabs generated in one page?
The problem I'm having is that only the current tab's stuff is
there, so I'm
not sure how to do all the validation.
I guess I would need a form validator that validates all the
fields of the
object that the form allows the user to edit.
I have required fields on several different tabs, but if the
elements of
another tab are not visible, I'm not sure how to validate against that.
Thanks!
>
> That depends on your code actually.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user