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

Reply via email to