p.add(new Label("statut", demande.getStatut())); ^ you should use models instead of passing it actual values, that way your data doesnt get out of sync. see the models page on the wiki
-igor 2009/2/27 <valery.ch...@steria.com>: > I've already try that. It didn't work. > But maybe I'm doing something wrong ... > > Here's the page code : > > > private DemandeUnitaire demande; > private GererMesLignesUnitForm myForm; > private AjaxTabbedPanel tabPanel; > private Panel currentPanel; > > public GererMesLignesUnitPage(int selectedTab, Object infosToShow) { > > if (selectedTab == 1) > demande = (DemandeUnitaire) infosToShow; > > myForm = new GererMesLignesUnitForm("recherche", new CompoundPropertyModel > (new DemandeUnitaire())); > List tabs = new ArrayList(); > > tabs.add(new PanelCachingTab( > new AbstractTab(new Model("first tab")) { > private static final long serialVersionUID = 1L; > public Panel getPanel(String panelId) { > > Panel p = new TabPanel1(panelId); > > FeedbackPanel feedback = new FeedbackPanel("msgs" > ); > p.add(feedback); > > > p.add(myForm); > > return p; > } > } > ) { > �...@override > public Panel getPanel(final String panelId) { > return super.getPanel(panelId); > } > }); > > tabs.add(new PanelCachingTab( > new AbstractTab(new Model("second tab")) { > private static final long serialVersionUID = 1L; > public Panel getPanel(String panelId) { > > Panel p = new TabPanel2(panelId); > p.add(new Label("statut", demande.getStatut())); > p.add(new Label("numMachine", demande > .getNumMachine())); > > HeaderContributor alert = new HeaderContributor( > new IHeaderContributor() { > public void > renderHead(IHeaderResponse response) { > response.renderOnLoadJavascript("onloadEvent();"); > } > } > ); > > p.add(HeaderContributor.forJavaScript( LIB_JS )); > p.add(HeaderContributor.forJavaScript( > SHOW_HIDE_COLUMN_JS )); > p.add(alert); > return p; > } > } > ) { > �...@override > public Panel getPanel(final String panelId) { > return super.getPanel(panelId); > } > }); > > > > > > > De : > Igor Vaynberg <igor.vaynb...@gmail.com> > A: > users@wicket.apache.org > Date: > 27/02/2009 17:27 > Objet : > Re: [AjaxTabbedPanel] Switching between form and result tab > > > > use panelcachingtab instead of abstracttab > > -igor > > 2009/2/27 <valery.ch...@steria.com>: >> Hi, >> >> Anyone have an idea on the matter below ? >> >> Cheers, >> >> Val >> >> >> >> De : >> valery.ch...@steria.com >> A: >> users@wicket.apache.org >> Date: >> 26/02/2009 14:11 >> Objet : >> [AjaxTabbedPanel] Switching between form and result tab >> >> >> >> Hi, >> >> I have an AjacTabbedPanel with two tabs. >> The first tab is a form which, when submitted, show the result on the >> second tabs. >> So far, everything's fine. >> >> I want to keep the input from the form after the submit so that the user >> can come back to the first tab and have a look at what the crierias was >> and maybe to modify them to make another request. >> But I need to be able switch back to the second tab and keep records of >> the result if the user didn't resubmit the form. >> >> I've search through the mailing list and the solution that come up most >> often is to override newLink to return an ajaxSubmitLink. But I don't >> think that's the solution for me since the form is only on the first >> panel. >> >> Cheers, >> >> Valery >> >> >> >> >> >> >> >> 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. >> >> >> >> >> >> >> >> >> >> >> >> 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 > > > > > > > > > > > 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