tabbedpanle.setselectedtab(int) -igor
On Mon, Mar 2, 2009 at 7:58 AM, <valery.ch...@steria.com> wrote: > True. > Actually, I call the same page (but a new instance) but focus on the > second tab. > I didn't find another way to switch tab on the onSubmit function. > > I'm not really familliar with wicket so since you are asking the question, > I guess there's a better way to do what I want ... > > > > > De : > Igor Vaynberg <igor.vaynb...@gmail.com> > A: > users@wicket.apache.org > Date: > 02/03/2009 16:45 > Objet : > Re: [AjaxTabbedPanel] Switching between form and result tab > > > > in your onsubmit you are calling setresponsepage, so you are going to > a different page, not tab? > > -igor > > On Mon, Mar 2, 2009 at 12:41 AM, <valery.ch...@steria.com> wrote: >> Thanks for the advice Igor. >> >> I passed the actual values to the second tab (via the submit method of > the >> form) just to see if it's working. >> So I guess that in the onSubmit method of the form, it's better to pass > a >> model than an object >> >> public class GererMesLignesUnitForm extends Form { >> ... >> protected void onSubmit() { >> >> Object newObject = createNewObjectFromRequest(); >> /* Previous call >> * GererMesLignesUnitPage pageResultat = new >> GererMesLignesUnitPage(1, newObject); >> */ >> >> GererMesLignesUnitPage pageResultat = new >> GererMesLignesUnitPage(1, newModelFromNewObject); >> setResponsePage(pageResultat); >> } >> } >> >> But that doesn't resolve my problem. How can I keep the input in the > form >> of the first tab in this case : >> >> - User fill the form on the first tab >> - User submit the form on the first tab >> - application do the search using the form input and show the result on >> the second tab with >> - User want to the same search with more criteria so he switch back on > the >> first tab >> - User have to fill back all his criteria ... <=== How can I keep them > ? >> >> - Should I pass the model of the form and the model of the result in the >> onSubmit() method ? >> - If not, do I use correctly the PanelCachingTab in my previous example > ? >> >> >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > > > > Ce message est à l'attention exclusive des destinataires désignés. Il peut > contenir des informations confidentielles. Si vous n'êtes pas destinataire > du message, merci d'en avertir immédiatement l'expéditeur et de détruire > ce message. Le contenu de ce message ne pourrait engager la responsabilité > de Steria que s'il a été émis par une personne dûment habilitée agissant > dans le strict cadre de ses fonctions et à des fins non étrangères à ses > attributions. Bien que les meilleurs efforts soient faits pour maintenir > cette transmission exempte de tout virus, l'expéditeur ne donne aucune > garantie à cet égard et sa responsabilité ne saurait être engagée pour > tout dommage résultant d'un virus transmis. > > > This message is intended exclusively for the designated addressee. It may > contain confidential material. If you are not the correct addressee, > please notify the sender immediately and destroy the message. The content > of this message will engage the responsibility of Steria only if it has > been sent by an authorized person acting in the strict scope of his > functions and for purposes that are related to his competence. Although > reasonable efforts have been made to keep this transmission free from > viruses, the sender will not be liable for damages caused by a transmitted > virus. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org