Re: Re: WOPopUpButton - Refresh another > WOPopUpButton onChange
Hi Theo, Gotcha. Thanks a lot Message du : 24/06/2011 De : "Theodore Petrosky " A : webobjects-dev@lists.apple.com, naneon.raym...@neuf.fr Copie à : Sujet : Re: WOPopUpButton - Refresh another > WOPopUpButton onChange WOD AjaxOF1 : AjaxObserveField {observeFieldID = "pu1"; action = actionForpu1; updateContainerID = "uc2" } AjaxOF2 : AjaxObserveField { observeFieldID = "pu2"; action = actionForpu2; } AjaxOF3 : AjaxObserveField { observeFieldID = "pu3"; action = actionForpu3; } You can put the updatecontainer to update in each AjaxObserveField with updateContainerID = "" or in the action method you can (just don't do it in both places): public void actionForpu1() { //do some stuff using select1 and get the new list for pu2 AjaxUpdateContainer.updateContainerWithID("uc2", context()); } I sometimes like to put the ajaxupdatecontainers in the java because I can more easily see which containers I am updating. But that is just me. Ted --- On Fri, 6/24/11, webobjects-dev-requ...@lists.apple.com wrote: > Message: 1 > Date: Fri, 24 Jun 2011 13:36:30 +0200 (CEST) > From: naneon.raym...@neuf.fr > Subject: Re: Re: Webobjects-dev Digest, Vol 8, Issue 428 > To: Theodore Petrosky ,> WebObjects webobjects-dev > > Message-ID: > <32188123.693711308915390559.JavaMail.www@wsfrf1223> > Content-Type: text/plain; charset="utf-8" > > Hi, > > > I know this example and it work because the first pop 1 > contains data of the pop 2. In my case, the pop 1 don't > contains pop 2 data. so ajaxUpdateContainer don't work. to > refresh the pop 2 data, it call a method which fetch pop 2 > with pop 1 selected data primaryKey. > > Ray > > > > > Message du : 24/06/2011 > De : "Theodore Petrosky " > A : webobjects-dev@lists.apple.com > Copie à : naneon.raym...@neuf.fr > Sujet : Re: Webobjects-dev Digest, Vol 8, Issue 428 > > > > Have you looked at the Project Wonder Ajax examples. I use > the AjaxObserverField and AjaxUpdateContainer methods and > they work great for any number of WOPopUps that I want to be > dependent on each other. Ted http://services.wocommunity.org/apps/WebObjects/AjaxExample -- > > > Message: 3 > Date: Fri, 24 Jun 2011 > 11:46:22 +0200 (CEST) > From: naneon.raym...@neuf.fr > > Subject: WOPopUpButton - Refresh another WOPopUpButton > > onChange > To: WebObjects webobjects-dev > > Message-ID: > > Hi, > > > > I have a little problem on my apps. When I want to > search > something, I do selection of parameters by > WOPupUpButton. > But the problem is when I do the 1st > search (1st fetch) > there are no problem but when I want > to do another search > and I select another parameter in > the WOPopUpButton which > refresh the second one, the > display page refresh all datas > (do the fetch(1st > search) I done before) and then update > parameter of > second WOPopUpButton. It makes > my apps slow. > > > Here is > exemple of codes : > > > in html : > > > Pop 1 > > Pop 2, > data depends to > Pop1 > > > WOSubmitButton hidden > by css which contain method to > refresh pop 2 data > > in wod : > > > periode : WOPopUpButton { > > list = periodes; > >item = currentPeriode; > >displayString = currentPeriode.libelle; > > > noSelectionString = > "Toutes"; > selection = > selectedPeriode; > size = > "1"; > class = > "periode"; > onchange = > > "javascript:this.form.elements['change'].click()"; > action > which call method bind to onChange > WOSubmitButton > } > > > > > niveau : WOPopUpButton { > >list = niveaux; ===>data depend to > > Pop 1 > item = > currentNiveaux; > >displayString > =currentNiveaux.libelle; > >noSelectionString = "Tous"; > > selection = > selectedNiveaux; > size = > "1"; > class = > "niveau"; > } > > > > > onChange : WOSubmitButton { > >name = "change"; > > action = onChange; > >class = "hide > "; > value = ""; > > } > > > in Java : > > > public WOActionResults onChange() { >> > > comboxNiveau(
Re: WOPopUpButton - Refresh another > WOPopUpButton onChange
WOD AjaxOF1 : AjaxObserveField { observeFieldID = "pu1"; action = actionForpu1; updateContainerID = "uc2" } AjaxOF2 : AjaxObserveField { observeFieldID = "pu2"; action = actionForpu2; } AjaxOF3 : AjaxObserveField { observeFieldID = "pu3"; action = actionForpu3; } You can put the updatecontainer to update in each AjaxObserveField with updateContainerID = "" or in the action method you can (just don't do it in both places): public void actionForpu1() { //do some stuff using select1 and get the new list for pu2 AjaxUpdateContainer.updateContainerWithID("uc2", context()); } I sometimes like to put the ajaxupdatecontainers in the java because I can more easily see which containers I am updating. But that is just me. Ted --- On Fri, 6/24/11, webobjects-dev-requ...@lists.apple.com wrote: > Message: 1 > Date: Fri, 24 Jun 2011 13:36:30 +0200 (CEST) > From: naneon.raym...@neuf.fr > Subject: Re: Re: Webobjects-dev Digest, Vol 8, Issue 428 > To: Theodore Petrosky , > WebObjects webobjects-dev > > Message-ID: > <32188123.693711308915390559.JavaMail.www@wsfrf1223> > Content-Type: text/plain; charset="utf-8" > > Hi, > > > I know this example and it work because the first pop 1 > contains data of the pop 2. In my case, the pop 1 don't > contains pop 2 data. so ajaxUpdateContainer don't work. to > refresh the pop 2 data, it call a method which fetch pop 2 > with pop 1 selected data primaryKey. > > Ray > > > > > Message du : 24/06/2011 > De : "Theodore Petrosky " > A : webobjects-dev@lists.apple.com > Copie à : naneon.raym...@neuf.fr > Sujet : Re: Webobjects-dev Digest, Vol 8, Issue 428 > > > > Have you looked at the Project Wonder Ajax examples. I use > the AjaxObserverField and AjaxUpdateContainer methods and > they work great for any number of WOPopUps that I want to be > dependent on each other. Ted > http://services.wocommunity.org/apps/WebObjects/AjaxExample -- > > > Message: 3 > Date: Fri, 24 Jun 2011 > 11:46:22 +0200 (CEST) > From: naneon.raym...@neuf.fr > > Subject: WOPopUpButton - Refresh another WOPopUpButton > > onChange > To: WebObjects webobjects-dev > > Message-ID: > > Hi, > > > > I have a little problem on my apps. When I want to > search > something, I do selection of parameters by > WOPupUpButton. > But the problem is when I do the 1st > search (1st fetch) > there are no problem but when I want > to do another search > and I select another parameter in > the WOPopUpButton which > refresh the second one, the > display page refresh all datas > (do the fetch(1st > search) I done before) and then update > parameter of > second WOPopUpButton. It makes > my apps slow. > > > Here is > exemple of codes : > > > in html : > > > Pop 1 > > Pop 2, > data depends to > Pop1 > > > WOSubmitButton hidden > by css which contain method to > refresh pop 2 data > > in wod : > > > periode : WOPopUpButton { > > list = periodes; > > item = currentPeriode; > > displayString = currentPeriode.libelle; > > > noSelectionString = > "Toutes"; > selection = > selectedPeriode; > size = > "1"; > class = > "periode"; > onchange = > > "javascript:this.form.elements['change'].click()"; > action > which call method bind to onChange > WOSubmitButton > } > > > > > niveau : WOPopUpButton { > > list = niveaux; ===>data depend to > > Pop 1 > item = > currentNiveaux; > > displayString > =currentNiveaux.libelle; > > noSelectionString = "Tous"; > > selection = > selectedNiveaux; > size = > "1"; > class = > "niveau"; > } > > > > > onChange : WOSubmitButton { > > name = "change"; > > action = onChange; > > class = "hide > "; > value = ""; > > } > > > in Java : > > > public WOActionResults onChange() { > > > > comboxNiveau(selectedPeriode); > > return null; > > } > > protected NSArray > comboxNiveau(EOVuePeriodeParam periode) > { > > if (periode == null) { > > > niveaux = > EOVueNivAdm.fetchAllEOVueNivAdms(session() > > > > > > .defaultEditingContext(), niveauOrderings); > > } else { > > EOQualifier > qual = > EOQualifier.qualifierWithQualifierFormat( > > > > "pperiode=%@", new > > NSArray(periode.primaryKey())); > > > niveaux = > EOVueNivAdm.fetchEOVueNivAdms(session() > > > > > > .defaultEditingContext(), qual, niveauOrderings); > > } > } > > ... > > > > I want to know if there another > way to refresh my pop 2 > data without using the > javascript which is obliged to submit > before refresh? > > > > Thanks > > > > -- next part -- > An HTML attachment was scrubbed... > URL: > http://lists.apple.com/pipermail/webobjects-dev/attachments/20110624/14fdb14c/attachment.html > >
[RESOLVED]Re: Re: WOPopUpButton - Refresh another WOPopUpButton onChange
Thanks a lot, You guys you rock. Envoyé depuis SFR Mail. 10 Go de stockage - en savoir plus. Message du : 24/06/2011 De : "Pascal Robert " A : "Paul D Yu" Copie à : naneon.raym...@neuf.fr, webobjects-dev@lists.apple.com Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange Le 2011-06-24 à 07:44, Paul D Yu a écrit : It should still work. You would have an action on the AjaxObserveField that points to a method on the Java class. The AOF would wrap popUp1. The AUC wraps popUp2. When the popUp1 changes, the action will trigger and call the server method. In the server method you would use the objectSelection to fetch the data for the popUp2. Then when the AjaxUpdateContainer of popUp2 refreshes, the data fetched previously will be there. I believe that's how it works. And it's working fine. I have a project where I use 5 WOBrowser components that depends on each other and it's working well. Paul On Jun 24, 2011, at 7:32 AM, naneon.raym...@neuf.fr wrote: I used ajaxUpateContainer and an AjaxObserveField, but don't work because ajaxUpdateContainer can't refresh pop 2 data. the relationShip beetwen periode and niveau id periode_id. periode don't contains niveau so impossible to connect observeField to call upDateContainer to refresh niveau list (list = niveaux not list = periode.niveaux ) Ray Message du : 24/06/2011 De : "Paul D Yu " A : "naneon.raym...@neuf.fr" Copie à : webobjects-dev@lists.apple.com Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange You can use ajaxUpateContainer and an AjaxObserveField? Paul Sent from my iPad On Jun 24, 2011, at 5:51 AM, naneon.raym...@neuf.fr wrote: -- SORRY THERE SOMES ERRORS - Hi, I have a little problem on my apps. When I want to search something, I do selection of parameters by WOPupUpButton. But the problem is when I do the 1st search (1st fetch) there are no problem but when I want to do another search and I select another parameter in the WOPopUpButton which refresh the second one, the display page refresh all datas (do the fetch(1st search) I done before) and then update parameter of second WOPopUpButton. It makes my apps slow. Here is exemple of codes : in html : Pop 1 Pop 2, data depends to Pop1 WOSubmitButton hidden by css which contain method to refresh pop 2 data in wod : periode : WOPopUpButton { list = periodes; item = currentPeriode; displayString = currentPeriode.libelle; noSelectionString = "Toutes"; selection = selectedPeriode; size = "1"; class = "periode"; onchange = "javascript:this.form.elements['change'].click()"; action which call method bind to onChange WOSubmitButton } niveau : WOPopUpButton { list = niveaux; ===>data depend to Pop 1 item = currentNiveaux; displayString =currentNiveaux.libelle; noSelectionString = "Tous"; selection = selectedNiveaux; size = "1"; class = "niveau"; } onChanges : WOSubmitButton { name = "change"; action = onChang; class = "hide"; value = ""; } in Java : public WOActionResults onChang() { comboxNiveau(selectedPeriode); return null; } protected NSArray comboxNiveau(EOVuePeriodeParam periode) { if (periode == null) { niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() .defaultEditingContext(), niveauOrderings); } else { EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( "pperiode=%@", new NSArray(periode.primaryKey())); niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() .defaultEditingContext(), qual, niveauOrderings); } } ... I want to know if there another way to refresh my pop 2 data without using the javascript which is obliged to submit before refresh? Thanks ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com This email sent to p...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca This email sent to p
Re: WOPopUpButton - Refresh another WOPopUpButton onChange
Le 2011-06-24 à 07:44, Paul D Yu a écrit : > It should still work. > > You would have an action on the AjaxObserveField that points to a method on > the Java class. The AOF would wrap popUp1. The AUC wraps popUp2. > > When the popUp1 changes, the action will trigger and call the server method. > In the server method you would use the objectSelection to fetch the data for > the popUp2. Then when the AjaxUpdateContainer of popUp2 refreshes, the data > fetched previously will be there. > > I believe that's how it works. And it's working fine. I have a project where I use 5 WOBrowser components that depends on each other and it's working well. > Paul > > On Jun 24, 2011, at 7:32 AM, naneon.raym...@neuf.fr wrote: > >> I used ajaxUpateContainer and an AjaxObserveField, but don't work because >> ajaxUpdateContainer can't refresh pop 2 data. >> the relationShip beetwen periode and niveau id periode_id. periode don't >> contains niveau so impossible to connect observeField to call >> upDateContainer to refresh niveau list (list = niveaux not list = >> periode.niveaux ) >> >> Ray >> >> >> >> Message du : 24/06/2011 >> De : "Paul D Yu " >> A : "naneon.raym...@neuf.fr" >> Copie à : webobjects-dev@lists.apple.com >> Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange >> >> >> You can use ajaxUpateContainer and an AjaxObserveField? >> >> Paul >> >> Sent from my iPad >> >> On Jun 24, 2011, at 5:51 AM, naneon.raym...@neuf.fr wrote: >> >>> -- SORRY THERE SOMES ERRORS - >>> >>> Hi, >>> >>> I have a little problem on my apps. When I want to search something, I do >>> selection of parameters by WOPupUpButton. >>> But the problem is when I do the 1st search (1st fetch) there are no >>> problem but when I want to do another search and I select another parameter >>> in the WOPopUpButton which refresh the second one, the display page refresh >>> all datas (do the fetch(1st search) I done before) and then update >>> parameter of second WOPopUpButton. It makes my apps slow. >>> >>> Here is exemple of codes : >>> >>> in html : >>> Pop 1 >>> Pop 2, data depends to Pop1 >>> >>> WOSubmitButton hidden by css which contain >>> method to refresh pop 2 data >>> >>> in wod : >>> periode : WOPopUpButton { >>> list = periodes; >>> item = currentPeriode; >>> displayString = currentPeriode.libelle; >>> noSelectionString = "Toutes"; >>> selection = selectedPeriode; >>> size = "1"; >>> class = "periode"; >>> onchange = "javascript:this.form.elements['change'].click()"; action >>> which call method bind to onChange WOSubmitButton >>> } >>> >>> niveau : WOPopUpButton { >>> list = niveaux; ===>data depend to Pop 1 >>> item = currentNiveaux; >>> displayString =currentNiveaux.libelle; >>> noSelectionString = "Tous"; >>> selection = selectedNiveaux; >>> size = "1"; >>> class = "niveau"; >>> } >>> >>> onChanges : WOSubmitButton { >>> name = "change"; >>> action = onChang; >>> class = "hide"; >>> value = ""; >>> } >>> >>> >>> in Java : >>> public WOActionResults onChang() { >>> comboxNiveau(selectedPeriode); >>> return null; >>> } >>> protected NSArray comboxNiveau(EOVuePeriodeParam periode) { >>> if (periode == null) { >>> niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() >>> .defaultEditingContext(), >>> niveauOrderings); >>> } else { >>> EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( >>> "pperiode=%@", new >>> NSArray(periode.primaryKey())); >>> niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() >>> .defaultEditingContext(), qual, >>> niveauOrderings); >>> } >>> } >>> >>> ... >>> >>> I want to know if t
Re: WOPopUpButton - Refresh another WOPopUpButton onChange
It should still work. You would have an action on the AjaxObserveField that points to a method on the Java class. The AOF would wrap popUp1. The AUC wraps popUp2. When the popUp1 changes, the action will trigger and call the server method. In the server method you would use the objectSelection to fetch the data for the popUp2. Then when the AjaxUpdateContainer of popUp2 refreshes, the data fetched previously will be there. I believe that's how it works. Paul On Jun 24, 2011, at 7:32 AM, naneon.raym...@neuf.fr wrote: > I used ajaxUpateContainer and an AjaxObserveField, but don't work because > ajaxUpdateContainer can't refresh pop 2 data. > the relationShip beetwen periode and niveau id periode_id. periode don't > contains niveau so impossible to connect observeField to call upDateContainer > to refresh niveau list (list = niveaux not list = periode.niveaux ) > > Ray > > > > Message du : 24/06/2011 > De : "Paul D Yu " > A : "naneon.raym...@neuf.fr" > Copie à : webobjects-dev@lists.apple.com > Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange > > > You can use ajaxUpateContainer and an AjaxObserveField? > > Paul > > Sent from my iPad > > On Jun 24, 2011, at 5:51 AM, naneon.raym...@neuf.fr wrote: > >> -- SORRY THERE SOMES ERRORS - >> >> Hi, >> >> I have a little problem on my apps. When I want to search something, I do >> selection of parameters by WOPupUpButton. >> But the problem is when I do the 1st search (1st fetch) there are no problem >> but when I want to do another search and I select another parameter in the >> WOPopUpButton which refresh the second one, the display page refresh all >> datas (do the fetch(1st search) I done before) and then update parameter of >> second WOPopUpButton. It makes my apps slow. >> >> Here is exemple of codes : >> >> in html : >> Pop 1 >> Pop 2, data depends to Pop1 >> >> WOSubmitButton hidden by css which contain >> method to refresh pop 2 data >> >> in wod : >> periode : WOPopUpButton { >> list = periodes; >> item = currentPeriode; >> displayString = currentPeriode.libelle; >> noSelectionString = "Toutes"; >> selection = selectedPeriode; >> size = "1"; >> class = "periode"; >> onchange = "javascript:this.form.elements['change'].click()"; action >> which call method bind to onChange WOSubmitButton >> } >> >> niveau : WOPopUpButton { >> list = niveaux; ===>data depend to Pop 1 >> item = currentNiveaux; >> displayString =currentNiveaux.libelle; >> noSelectionString = "Tous"; >> selection = selectedNiveaux; >> size = "1"; >> class = "niveau"; >> } >> >> onChanges : WOSubmitButton { >> name = "change"; >> action = onChang; >> class = "hide"; >> value = ""; >> } >> >> >> in Java : >> public WOActionResults onChang() { >> comboxNiveau(selectedPeriode); >> return null; >> } >> protected NSArray comboxNiveau(EOVuePeriodeParam periode) { >> if (periode == null) { >> niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() >> .defaultEditingContext(), >> niveauOrderings); >> } else { >>EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( >> "pperiode=%@", new >> NSArray(periode.primaryKey())); >> niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() >> .defaultEditingContext(), qual, >> niveauOrderings); >> } >> } >> >> ... >> >> I want to know if there another way to refresh my pop 2 data without using >> the javascript which is obliged to submit before refresh? >> >> Thanks >> >> >> ___ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com >> >> This email sent to p...@mac.com > ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Re: WOPopUpButton - Refresh another WOPopUpButton onChange
I used ajaxUpateContainer and an AjaxObserveField, but don't work because ajaxUpdateContainer can't refresh pop 2 data. the relationShip beetwen periode and niveau id periode_id. periode don't contains niveau so impossible to connect observeField to call upDateContainer to refresh niveau list (list = niveaux not list = periode.niveaux ) Ray Message du : 24/06/2011 De : "Paul D Yu " A : "naneon.raym...@neuf.fr" Copie à : webobjects-dev@lists.apple.com Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange You can use ajaxUpateContainer and an AjaxObserveField? Paul Sent from my iPad On Jun 24, 2011, at 5:51 AM, naneon.raym...@neuf.fr wrote: -- SORRY THERE SOMES ERRORS - Hi, I have a little problem on my apps. When I want to search something, I do selection of parameters by WOPupUpButton. But the problem is when I do the 1st search (1st fetch) there are no problem but when I want to do another search and I select another parameter in the WOPopUpButton which refresh the second one, the display page refresh all datas (do the fetch(1st search) I done before) and then update parameter of second WOPopUpButton. It makes my apps slow. Here is exemple of codes : in html : Pop 1 Pop 2, data depends to Pop1 WOSubmitButton hidden by css which contain method to refresh pop 2 data in wod : periode : WOPopUpButton { list = periodes; item = currentPeriode; displayString = currentPeriode.libelle; noSelectionString = "Toutes"; selection = selectedPeriode; size = "1"; class = "periode"; onchange = "javascript:this.form.elements['change'].click()"; action which call method bind to onChange WOSubmitButton } niveau : WOPopUpButton { list = niveaux; ===>data depend to Pop 1 item = currentNiveaux; displayString =currentNiveaux.libelle; noSelectionString = "Tous"; selection = selectedNiveaux; size = "1"; class = "niveau"; } onChanges : WOSubmitButton { name = "change"; action = onChang; class = "hide"; value = ""; } in Java : public WOActionResults onChang() { comboxNiveau(selectedPeriode); return null; } protected NSArray comboxNiveau(EOVuePeriodeParam periode) { if (periode == null) { niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() .defaultEditingContext(), niveauOrderings); } else { EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( "pperiode=%@", new NSArray(periode.primaryKey())); niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() .defaultEditingContext(), qual, niveauOrderings); } } ... I want to know if there another way to refresh my pop 2 data without using the javascript which is obliged to submit before refresh? Thanks ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com This email sent to p...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOPopUpButton - Refresh another WOPopUpButton onChange
You can use ajaxUpateContainer and an AjaxObserveField? Paul Sent from my iPad On Jun 24, 2011, at 5:51 AM, naneon.raym...@neuf.fr wrote: > -- SORRY THERE SOMES ERRORS - > > Hi, > > I have a little problem on my apps. When I want to search something, I do > selection of parameters by WOPupUpButton. > But the problem is when I do the 1st search (1st fetch) there are no problem > but when I want to do another search and I select another parameter in the > WOPopUpButton which refresh the second one, the display page refresh all > datas (do the fetch(1st search) I done before) and then update parameter of > second WOPopUpButton. It makes my apps slow. > > Here is exemple of codes : > > in html : > Pop 1 > Pop 2, data depends to Pop1 > WOSubmitButton hidden by css which contain > method to refresh pop 2 data > > in wod : > periode : WOPopUpButton { > list = periodes; > item = currentPeriode; > displayString = currentPeriode.libelle; > noSelectionString = "Toutes"; > selection = selectedPeriode; > size = "1"; > class = "periode"; > onchange = "javascript:this.form.elements['change'].click()"; action > which call method bind to onChange WOSubmitButton > } > > niveau : WOPopUpButton { > list = niveaux; ===>data depend to Pop 1 > item = currentNiveaux; > displayString =currentNiveaux.libelle; > noSelectionString = "Tous"; > selection = selectedNiveaux; > size = "1"; > class = "niveau"; > } > > onChanges : WOSubmitButton { > name = "change"; > action = onChang; > class = "hide"; > value = ""; > } > > in Java : > public WOActionResults onChang() { > comboxNiveau(selectedPeriode); > return null; > } > protected NSArray comboxNiveau(EOVuePeriodeParam periode) { > if (periode == null) { > niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() > .defaultEditingContext(), > niveauOrderings); > } else { > EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( > "pperiode=%@", new > NSArray(periode.primaryKey())); > niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() > .defaultEditingContext(), qual, > niveauOrderings); > } > } > > ... > > I want to know if there another way to refresh my pop 2 data without using > the javascript which is obliged to submit before refresh? > > Thanks > > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com > > This email sent to p...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOPopUpButton - Refresh another WOPopUpButton onChange
-- SORRY THERE SOMES ERRORS - Hi, I have a little problem on my apps. When I want to search something, I do selection of parameters by WOPupUpButton. But the problem is when I do the 1st search (1st fetch) there are no problem but when I want to do another search and I select another parameter in the WOPopUpButton which refresh the second one, the display page refresh all datas (do the fetch(1st search) I done before) and then update parameter of second WOPopUpButton. It makes my apps slow. Here is exemple of codes : in html : Pop 1 Pop 2, data depends to Pop1 WOSubmitButton hidden by css which contain method to refresh pop 2 data in wod : periode : WOPopUpButton { list = periodes; item = currentPeriode; displayString = currentPeriode.libelle; noSelectionString = "Toutes"; selection = selectedPeriode; size = "1"; class = "periode"; onchange = "javascript:this.form.elements['change'].click()"; action which call method bind to onChange WOSubmitButton } niveau : WOPopUpButton { list = niveaux; ===>data depend to Pop 1 item = currentNiveaux; displayString =currentNiveaux.libelle; noSelectionString = "Tous"; selection = selectedNiveaux; size = "1"; class = "niveau"; } onChanges : WOSubmitButton { name = "change"; action = onChang; class = "hide"; value = ""; } in Java : public WOActionResults onChang() { comboxNiveau(selectedPeriode); return null; } protected NSArray comboxNiveau(EOVuePeriodeParam periode) { if (periode == null) { niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() .defaultEditingContext(), niveauOrderings); } else { EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( "pperiode=%@", new NSArray(periode.primaryKey())); niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() .defaultEditingContext(), qual, niveauOrderings); } } ... I want to know if there another way to refresh my pop 2 data without using the javascript which is obliged to submit before refresh? Thanks ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com