You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by atcach <at...@gmail.com> on 2011/02/10 12:25:34 UTC
Tapestry 5 zone inside a form
Hi,
I have a form and inside it I have a country/city/etc selection.
The form is inside a zone.
When calling the onSelected for make the change of the country/city, when
returning I loose the other form data. How can I keep it ?
I think a zone inside the form would help, but I am getting:
Form components may not be placed inside other Form components.
The Ubigeos type is just a component with other selects that are filled from
the pais select
My .tml is
<t:zone t:id="datosPersonalesZone">
<form t:type="form" t:id="formulariodatospersonales"
t:zone="datosPersonalesZone">
<t:errors/>
Sexo: <select t:type="Select" t:id="sexo"
t:value="actual.sexo" model="sexo" />
País: <input t:type="Select" t:id="pais" model="paises"
t:value="pais" t:zone="ubigeosZone"/>
<t:zone t:id="ubigeosZone">
<input t:type="Ubigeos" t:id="ubigeo_nacimiento"
t:ubigeo="ubigeoNacimiento"
t:zone="ubigeosZone"/>
</t:zone>
</form>
Regards !
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379144.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry 5 zone inside a form
Posted by Mark <ma...@xeric.net>.
I'm not completely following your code. I don't see what is actually
triggering the zone update and I don't know what the field names mean.
But, I would suggest that you get rid of the outer zone and get it to
work with the smaller zone first. If they are selecting a Country and
then you populate the list of Cities based on the Country they select,
there is no reason to submit the form until you are ready to do
something with it.
Also, if the form has an object behind it, you should get all the
values back if it is being persisted correctly.
Mark
On Thu, Feb 10, 2011 at 1:53 PM, atcach <at...@gmail.com> wrote:
>
> Yes.
> Te only solution I have (I guess) is to break the zone in two and have two
> forms.
> The other would be to put a keyup event in each field (external) and save
> each one of them, but I have a lot of fields and think is impractical.
> Is there another way around ?
> Regards !
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry 5 zone inside a form
Posted by atcach <at...@gmail.com>.
Yes.
Te only solution I have (I guess) is to break the zone in two and have two
forms.
The other would be to put a keyup event in each field (external) and save
each one of them, but I have a lot of fields and think is impractical.
Is there another way around ?
Regards !
On Thu, Feb 10, 2011 at 3:03 PM, Mark [via Tapestry] <
ml-node+3379805-1153718013-147064@n5.nabble.com> wrote:
> On Thu, Feb 10, 2011 at 10:32 AM, atcach <[hidden email]<http://user/SendEmail.jtp?type=node&node=3379805&i=0>>
> wrote:
> >
> > Yes, indeed. I need only to update the zone named ubigeosZone (which is
> > inside another zone)
> > Regards
>
> But is the entire form updating instead and wiping out anything that
> has already been entered?
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3379805&i=1>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3379805&i=2>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379805.html
> To unsubscribe from Tapestry 5 zone inside a form, click here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3379144&code=YXRjYWNoQGdtYWlsLmNvbXwzMzc5MTQ0fDkxMDA2MDA1>.
>
>
--
Alexis Tcach
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379999.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
Re: Tapestry 5 zone inside a form
Posted by Mark <ma...@xeric.net>.
On Thu, Feb 10, 2011 at 10:32 AM, atcach <at...@gmail.com> wrote:
>
> Yes, indeed. I need only to update the zone named ubigeosZone (which is
> inside another zone)
> Regards
But is the entire form updating instead and wiping out anything that
has already been entered?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry 5 zone inside a form
Posted by atcach <at...@gmail.com>.
Yes, indeed. I need only to update the zone named ubigeosZone (which is
inside another zone)
Regards
On Thu, Feb 10, 2011 at 1:08 PM, Mark [via Tapestry] <
ml-node+3379591-751562805-147064@n5.nabble.com> wrote:
> You probably want to update only the zone field that needs to be
> updated. If you update the entire form when a particular piece of
> information in it changes, you are going to have to make sure you have
> a strategy for submitting the information and getting it back into the
> form.
>
> You can put a zone inside a form. I'm not sure why it would be giving
> you an error unless you have something nested funny.
>
> Mark
>
> On Thu, Feb 10, 2011 at 5:25 AM, atcach <[hidden email]<http://user/SendEmail.jtp?type=node&node=3379591&i=0>>
> wrote:
>
> >
> > Hi,
> >
> > I have a form and inside it I have a country/city/etc selection.
> > The form is inside a zone.
> > When calling the onSelected for make the change of the country/city, when
>
> > returning I loose the other form data. How can I keep it ?
> > I think a zone inside the form would help, but I am getting:
> > Form components may not be placed inside other Form components.
> > The Ubigeos type is just a component with other selects that are filled
> from
> > the pais select
> > My .tml is
> >
> > <t:zone t:id="datosPersonalesZone">
> >
> > <form t:type="form" t:id="formulariodatospersonales"
> > t:zone="datosPersonalesZone">
> >
> > <t:errors/>
> >
> >
> > Sexo: <select t:type="Select" t:id="sexo"
> > t:value="actual.sexo" model="sexo" />
> > País: <input t:type="Select" t:id="pais"
> model="paises"
> > t:value="pais" t:zone="ubigeosZone"/>
> >
> > <t:zone t:id="ubigeosZone">
> > <input t:type="Ubigeos" t:id="ubigeo_nacimiento"
> > t:ubigeo="ubigeoNacimiento"
> > t:zone="ubigeosZone"/>
> > </t:zone>
> > </form>
> >
> > Regards !
> > --
> > View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379144.html<http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379144.html?by-user=t>
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3379591&i=1>
> > For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3379591&i=2>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3379591&i=3>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3379591&i=4>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379591.html
> To unsubscribe from Tapestry 5 zone inside a form, click here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3379144&code=YXRjYWNoQGdtYWlsLmNvbXwzMzc5MTQ0fDkxMDA2MDA1>.
>
>
--
Alexis Tcach
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379626.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
Re: Tapestry 5 zone inside a form
Posted by Mark <ma...@xeric.net>.
You probably want to update only the zone field that needs to be
updated. If you update the entire form when a particular piece of
information in it changes, you are going to have to make sure you have
a strategy for submitting the information and getting it back into the
form.
You can put a zone inside a form. I'm not sure why it would be giving
you an error unless you have something nested funny.
Mark
On Thu, Feb 10, 2011 at 5:25 AM, atcach <at...@gmail.com> wrote:
>
> Hi,
>
> I have a form and inside it I have a country/city/etc selection.
> The form is inside a zone.
> When calling the onSelected for make the change of the country/city, when
> returning I loose the other form data. How can I keep it ?
> I think a zone inside the form would help, but I am getting:
> Form components may not be placed inside other Form components.
> The Ubigeos type is just a component with other selects that are filled from
> the pais select
> My .tml is
>
> <t:zone t:id="datosPersonalesZone">
>
> <form t:type="form" t:id="formulariodatospersonales"
> t:zone="datosPersonalesZone">
>
> <t:errors/>
>
>
> Sexo: <select t:type="Select" t:id="sexo"
> t:value="actual.sexo" model="sexo" />
> País: <input t:type="Select" t:id="pais" model="paises"
> t:value="pais" t:zone="ubigeosZone"/>
>
> <t:zone t:id="ubigeosZone">
> <input t:type="Ubigeos" t:id="ubigeo_nacimiento"
> t:ubigeo="ubigeoNacimiento"
> t:zone="ubigeosZone"/>
> </t:zone>
> </form>
>
> Regards !
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-zone-inside-a-form-tp3379144p3379144.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org