Res: Res: Res: [T5.1] Best approach to Nested Combos on Forms
I'm not talking only about the Combos itself... Any other field from the form loses it's value when the Zone is updated... So, the plan is to send every field value? De: Geoff Callender geoff.callender.jumpst...@gmail.com Para: Tapestry users users@tapestry.apache.org Enviadas: Quarta-feira, 31 de Março de 2010 20:30:12 Assunto: Re: Res: Res: [T5.1] Best approach to Nested Combos on Forms Or carry the 1at and 2nd combo selection info into the 3rd combo values too, eg. USA | San Francisco | SomeName. No? On 01/04/2010, at 3:55 AM, Everton Agner wrote: Yes, there is also the problem that, if there is more than two nested combos, the First Combo's selected option is lost when the Second Combo option is selected (and fills/filters the third combo). So, the easier way out is really updating the properties values (in the Page Class instance) by Ajax in every onBlur() on each field? Corrections: 1 - After the /t:form , there is a /div tag, not a div 2 - Its So, since everything is inside the updateZone DIV, every field is refreshed and lost their values. De: Geoff Callender geoff.callender.jumpst...@gmail.com Para: Tapestry users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 19:44:29 Assunto: Re: Res: [T5.1] Best approach to Nested Combos on Forms The origin of the problem is that the context passed to ZoneUpdater has only one piece of information - the value of the option you selected. No other context is received. So the server-side must get the rest of the context from either (a) the session, eg. by saving country and city in the session on output by using @Persist; or (b) saving them in a conversation persisted in the session or the database, which avoids the side-effects of @Persist; or (c) including the context in the value of the option selected, eg. when city option San Francisco is chosen, the value passed could be USA | San Francisco. Are there any other alternatives? Well maybe there's a way to use ZoneUpdater's context parameter, but I'm not sure. So (c) is looking pretty good. HTH, Geoff On 31/03/2010, at 6:53 AM, Everton Agner wrote: Just to show the example cleaner... div t:id=updateZone t:type=zone t:form ... / p:country !-- The nested combo that refresh the cities combo by the ZoneUpdater mixin-- /p:country p:city !-- The combo which it's content it's updated by the change of the Country combo -- /p:city p:name t:label ... / t:textfield id=name ... / /p:name ... /t:form div t:id=updateZone t:type=zone So, since everything is inside the updateZone combo, every field is refreshed and lost their values. Thanks! - Everton De: Everton Agner everton_ag...@yahoo.com.br Para: Tapestry Users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 16:39:37 Assunto: [T5.1] Best approach to Nested Combos on Forms Hi, I'd like to know which is the cleaner way to work with nesting on Forms on T5. I saw a project with the ZoneUpdater mixin... But, to preserve the values from the Form - to reload them after the refresh - it needed to @Persist the values and update them everytime the fields lost their focus. Example: t:textfield clientEvent=change event=changeName zone=updateZone t:mixins=zoneUpdater t:value=current.name t:id=name t:validate=required size=30/ So, there is a changeName() method in the Page Class to update the name field value - which is @Persist'ed. I don't like the way it sounds. Is there another way to achieve the nesting and preserve the Form fields values? Thanks - Everton Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com
Res: Res: [T5.1] Best approach to Nested Combos on Forms
Yes, there is also the problem that, if there is more than two nested combos, the First Combo's selected option is lost when the Second Combo option is selected (and fills/filters the third combo). So, the easier way out is really updating the properties values (in the Page Class instance) by Ajax in every onBlur() on each field? Corrections: 1 - After the /t:form , there is a /div tag, not a div 2 - Its So, since everything is inside the updateZone DIV, every field is refreshed and lost their values. De: Geoff Callender geoff.callender.jumpst...@gmail.com Para: Tapestry users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 19:44:29 Assunto: Re: Res: [T5.1] Best approach to Nested Combos on Forms The origin of the problem is that the context passed to ZoneUpdater has only one piece of information - the value of the option you selected. No other context is received. So the server-side must get the rest of the context from either (a) the session, eg. by saving country and city in the session on output by using @Persist; or (b) saving them in a conversation persisted in the session or the database, which avoids the side-effects of @Persist; or (c) including the context in the value of the option selected, eg. when city option San Francisco is chosen, the value passed could be USA | San Francisco. Are there any other alternatives? Well maybe there's a way to use ZoneUpdater's context parameter, but I'm not sure. So (c) is looking pretty good. HTH, Geoff On 31/03/2010, at 6:53 AM, Everton Agner wrote: Just to show the example cleaner... div t:id=updateZone t:type=zone t:form ... / p:country !-- The nested combo that refresh the cities combo by the ZoneUpdater mixin-- /p:country p:city !-- The combo which it's content it's updated by the change of the Country combo -- /p:city p:name t:label ... / t:textfield id=name ... / /p:name ... /t:form div t:id=updateZone t:type=zone So, since everything is inside the updateZone combo, every field is refreshed and lost their values. Thanks! - Everton De: Everton Agner everton_ag...@yahoo.com.br Para: Tapestry Users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 16:39:37 Assunto: [T5.1] Best approach to Nested Combos on Forms Hi, I'd like to know which is the cleaner way to work with nesting on Forms on T5. I saw a project with the ZoneUpdater mixin... But, to preserve the values from the Form - to reload them after the refresh - it needed to @Persist the values and update them everytime the fields lost their focus. Example: t:textfield clientEvent=change event=changeName zone=updateZone t:mixins=zoneUpdater t:value=current.name t:id=name t:validate=required size=30/ So, there is a changeName() method in the Page Class to update the name field value - which is @Persist'ed. I don't like the way it sounds. Is there another way to achieve the nesting and preserve the Form fields values? Thanks - Everton Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com
Re: Res: Res: [T5.1] Best approach to Nested Combos on Forms
Or carry the 1at and 2nd combo selection info into the 3rd combo values too, eg. USA | San Francisco | SomeName. No? On 01/04/2010, at 3:55 AM, Everton Agner wrote: Yes, there is also the problem that, if there is more than two nested combos, the First Combo's selected option is lost when the Second Combo option is selected (and fills/filters the third combo). So, the easier way out is really updating the properties values (in the Page Class instance) by Ajax in every onBlur() on each field? Corrections: 1 - After the /t:form , there is a /div tag, not a div 2 - Its So, since everything is inside the updateZone DIV, every field is refreshed and lost their values. De: Geoff Callender geoff.callender.jumpst...@gmail.com Para: Tapestry users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 19:44:29 Assunto: Re: Res: [T5.1] Best approach to Nested Combos on Forms The origin of the problem is that the context passed to ZoneUpdater has only one piece of information - the value of the option you selected. No other context is received. So the server-side must get the rest of the context from either (a) the session, eg. by saving country and city in the session on output by using @Persist; or (b) saving them in a conversation persisted in the session or the database, which avoids the side-effects of @Persist; or (c) including the context in the value of the option selected, eg. when city option San Francisco is chosen, the value passed could be USA | San Francisco. Are there any other alternatives? Well maybe there's a way to use ZoneUpdater's context parameter, but I'm not sure. So (c) is looking pretty good. HTH, Geoff On 31/03/2010, at 6:53 AM, Everton Agner wrote: Just to show the example cleaner... div t:id=updateZone t:type=zone t:form ... / p:country !-- The nested combo that refresh the cities combo by the ZoneUpdater mixin-- /p:country p:city !-- The combo which it's content it's updated by the change of the Country combo -- /p:city p:name t:label ... / t:textfield id=name ... / /p:name ... /t:form div t:id=updateZone t:type=zone So, since everything is inside the updateZone combo, every field is refreshed and lost their values. Thanks! - Everton De: Everton Agner everton_ag...@yahoo.com.br Para: Tapestry Users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 16:39:37 Assunto: [T5.1] Best approach to Nested Combos on Forms Hi, I'd like to know which is the cleaner way to work with nesting on Forms on T5. I saw a project with the ZoneUpdater mixin... But, to preserve the values from the Form - to reload them after the refresh - it needed to @Persist the values and update them everytime the fields lost their focus. Example: t:textfield clientEvent=change event=changeName zone=updateZone t:mixins=zoneUpdater t:value=current.name t:id=name t:validate=required size=30/ So, there is a changeName() method in the Page Class to update the name field value - which is @Persist'ed. I don't like the way it sounds. Is there another way to achieve the nesting and preserve the Form fields values? Thanks - Everton Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5.1] Best approach to Nested Combos on Forms
Hi, I'd like to know which is the cleaner way to work with nesting on Forms on T5. I saw a project with the ZoneUpdater mixin... But, to preserve the values from the Form - to reload them after the refresh - it needed to @Persist the values and update them everytime the fields lost their focus. Example: t:textfield clientEvent=change event=changeName zone=updateZone t:mixins=zoneUpdater t:value=current.name t:id=name t:validate=required size=30/ So, there is a changeName() method in the Page Class to update the name field value - which is @Persist'ed. I don't like the way it sounds. Is there another way to achieve the nesting and preserve the Form fields values? Thanks - Everton Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com
Res: [T5.1] Best approach to Nested Combos on Forms
Just to show the example cleaner... div t:id=updateZone t:type=zone t:form ... / p:country !-- The nested combo that refresh the cities combo by the ZoneUpdater mixin-- /p:country p:city !-- The combo which it's content it's updated by the change of the Country combo -- /p:city p:name t:label ... / t:textfield id=name ... / /p:name ... /t:form div t:id=updateZone t:type=zone So, since everything is inside the updateZone combo, every field is refreshed and lost their values. Thanks! - Everton De: Everton Agner everton_ag...@yahoo.com.br Para: Tapestry Users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 16:39:37 Assunto: [T5.1] Best approach to Nested Combos on Forms Hi, I'd like to know which is the cleaner way to work with nesting on Forms on T5. I saw a project with the ZoneUpdater mixin... But, to preserve the values from the Form - to reload them after the refresh - it needed to @Persist the values and update them everytime the fields lost their focus. Example: t:textfield clientEvent=change event=changeName zone=updateZone t:mixins=zoneUpdater t:value=current.name t:id=name t:validate=required size=30/ So, there is a changeName() method in the Page Class to update the name field value - which is @Persist'ed. I don't like the way it sounds. Is there another way to achieve the nesting and preserve the Form fields values? Thanks - Everton Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com
Re: Res: [T5.1] Best approach to Nested Combos on Forms
The origin of the problem is that the context passed to ZoneUpdater has only one piece of information - the value of the option you selected. No other context is received. So the server-side must get the rest of the context from either (a) the session, eg. by saving country and city in the session on output by using @Persist; or (b) saving them in a conversation persisted in the session or the database, which avoids the side-effects of @Persist; or (c) including the context in the value of the option selected, eg. when city option San Francisco is chosen, the value passed could be USA | San Francisco. Are there any other alternatives? Well maybe there's a way to use ZoneUpdater's context parameter, but I'm not sure. So (c) is looking pretty good. HTH, Geoff On 31/03/2010, at 6:53 AM, Everton Agner wrote: Just to show the example cleaner... div t:id=updateZone t:type=zone t:form ... / p:country !-- The nested combo that refresh the cities combo by the ZoneUpdater mixin-- /p:country p:city !-- The combo which it's content it's updated by the change of the Country combo -- /p:city p:name t:label ... / t:textfield id=name ... / /p:name ... /t:form div t:id=updateZone t:type=zone So, since everything is inside the updateZone combo, every field is refreshed and lost their values. Thanks! - Everton De: Everton Agner everton_ag...@yahoo.com.br Para: Tapestry Users users@tapestry.apache.org Enviadas: Terça-feira, 30 de Março de 2010 16:39:37 Assunto: [T5.1] Best approach to Nested Combos on Forms Hi, I'd like to know which is the cleaner way to work with nesting on Forms on T5. I saw a project with the ZoneUpdater mixin... But, to preserve the values from the Form - to reload them after the refresh - it needed to @Persist the values and update them everytime the fields lost their focus. Example: t:textfield clientEvent=change event=changeName zone=updateZone t:mixins=zoneUpdater t:value=current.name t:id=name t:validate=required size=30/ So, there is a changeName() method in the Page Class to update the name field value - which is @Persist'ed. I don't like the way it sounds. Is there another way to achieve the nesting and preserve the Form fields values? Thanks - Everton Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org