You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Hugo Palma <hu...@xpand-it.com> on 2009/04/27 17:38:30 UTC

Getting a zone id when inside another zone

I have a template that looks something like this:

<div t:type="zone" t:id="outerZone">

<form t:type="form" t:zone="innerZone">
</form>

<div t:type="zone" t:id="innerZone">
</div>
</div>

The problem is figuring out the id of the innerZone in order to pass
it to the form. Because the innerZone is itself inside a zone once the
outerZone gets updated a new id is generated to the innerZone making
the id i passed to the form an invalid one. I also tried something
like:

<form t:type="form" t:zone="prop:innerZone.clientId">

but it doesn't work either.
Any ideas on how i could make this work ?
Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Getting a zone id when inside another zone

Posted by "Joost Schouten (mailing lists)" <jo...@jsportal.com>.
good to hear the solution was a lot simpler than I thought. Gotta love
quick fixes  :-)

On Tue, Apr 28, 2009 at 9:14 PM, Hugo Palma <hu...@gmail.com> wrote:
> Thanks for you help Joost,
> i don't think there was any other javascript failing. Simply the form
> performed a usual submit instead of doing a partial update.
>
> On Mon, Apr 27, 2009 at 11:42 PM, Joost Schouten (mailing lists)
> <jo...@jsportal.com> wrote:
>> I think there might be another problem at play here because when you
>> refresh your outer zone, your form and zone are both re-rendered. I
>> have numerous situations like this in my app which work fine. It more
>> sounds like the scripts passed along in the response JSON from your
>> outerZone are not handled correctly and thus not initializing the zone
>> properly. This can be due to some other javascript failing.
>>
>> What is the exact behavior you are getting and what errors are occurring?
>>
>> Cheers,
>> Joost
>>
>> On Tue, Apr 28, 2009 at 3:38 AM, Hugo Palma <hu...@xpand-it.com> wrote:
>>> I have a template that looks something like this:
>>>
>>> <div t:type="zone" t:id="outerZone">
>>>
>>> <form t:type="form" t:zone="innerZone">
>>> </form>
>>>
>>> <div t:type="zone" t:id="innerZone">
>>> </div>
>>> </div>
>>>
>>> The problem is figuring out the id of the innerZone in order to pass
>>> it to the form. Because the innerZone is itself inside a zone once the
>>> outerZone gets updated a new id is generated to the innerZone making
>>> the id i passed to the form an invalid one. I also tried something
>>> like:
>>>
>>> <form t:type="form" t:zone="prop:innerZone.clientId">
>>>
>>> but it doesn't work either.
>>> Any ideas on how i could make this work ?
>>> Thanks.
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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


Re: Getting a zone id when inside another zone

Posted by Hugo Palma <hu...@gmail.com>.
Thanks for you help Joost,
i don't think there was any other javascript failing. Simply the form
performed a usual submit instead of doing a partial update.

On Mon, Apr 27, 2009 at 11:42 PM, Joost Schouten (mailing lists)
<jo...@jsportal.com> wrote:
> I think there might be another problem at play here because when you
> refresh your outer zone, your form and zone are both re-rendered. I
> have numerous situations like this in my app which work fine. It more
> sounds like the scripts passed along in the response JSON from your
> outerZone are not handled correctly and thus not initializing the zone
> properly. This can be due to some other javascript failing.
>
> What is the exact behavior you are getting and what errors are occurring?
>
> Cheers,
> Joost
>
> On Tue, Apr 28, 2009 at 3:38 AM, Hugo Palma <hu...@xpand-it.com> wrote:
>> I have a template that looks something like this:
>>
>> <div t:type="zone" t:id="outerZone">
>>
>> <form t:type="form" t:zone="innerZone">
>> </form>
>>
>> <div t:type="zone" t:id="innerZone">
>> </div>
>> </div>
>>
>> The problem is figuring out the id of the innerZone in order to pass
>> it to the form. Because the innerZone is itself inside a zone once the
>> outerZone gets updated a new id is generated to the innerZone making
>> the id i passed to the form an invalid one. I also tried something
>> like:
>>
>> <form t:type="form" t:zone="prop:innerZone.clientId">
>>
>> but it doesn't work either.
>> Any ideas on how i could make this work ?
>> Thanks.
>>
>> ---------------------------------------------------------------------
>> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Getting a zone id when inside another zone

Posted by "Joost Schouten (mailing lists)" <jo...@jsportal.com>.
I think there might be another problem at play here because when you
refresh your outer zone, your form and zone are both re-rendered. I
have numerous situations like this in my app which work fine. It more
sounds like the scripts passed along in the response JSON from your
outerZone are not handled correctly and thus not initializing the zone
properly. This can be due to some other javascript failing.

What is the exact behavior you are getting and what errors are occurring?

Cheers,
Joost

On Tue, Apr 28, 2009 at 3:38 AM, Hugo Palma <hu...@xpand-it.com> wrote:
> I have a template that looks something like this:
>
> <div t:type="zone" t:id="outerZone">
>
> <form t:type="form" t:zone="innerZone">
> </form>
>
> <div t:type="zone" t:id="innerZone">
> </div>
> </div>
>
> The problem is figuring out the id of the innerZone in order to pass
> it to the form. Because the innerZone is itself inside a zone once the
> outerZone gets updated a new id is generated to the innerZone making
> the id i passed to the form an invalid one. I also tried something
> like:
>
> <form t:type="form" t:zone="prop:innerZone.clientId">
>
> but it doesn't work either.
> Any ideas on how i could make this work ?
> Thanks.
>
> ---------------------------------------------------------------------
> 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


Re: Getting a zone id when inside another zone

Posted by Hugo Palma <hu...@gmail.com>.
Yep, that did the trick.
Thanks

On Tue, Apr 28, 2009 at 2:29 AM, DH <ni...@gmail.com> wrote:
> What about giving the static id to the innerZone, like following:
>
> <div t:type="zone" t:id="innerZone" id="innerZone">
> </div>
>
> DH
> ----- Original Message -----
> From: "Hugo Palma"
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Monday, April 27, 2009 11:38 PM
> Subject: Getting a zone id when inside another zone
>
>
>>I have a template that looks something like this:
>>
>> <div t:type="zone" t:id="outerZone">
>>
>> <form t:type="form" t:zone="innerZone">
>> </form>
>>
>> <div t:type="zone" t:id="innerZone">
>> </div>
>> </div>
>>
>> The problem is figuring out the id of the innerZone in order to pass
>> it to the form. Because the innerZone is itself inside a zone once the
>> outerZone gets updated a new id is generated to the innerZone making
>> the id i passed to the form an invalid one. I also tried something
>> like:
>>
>> <form t:type="form" t:zone="prop:innerZone.clientId">
>>
>> but it doesn't work either.
>> Any ideas on how i could make this work ?
>> Thanks.
>>
>> ---------------------------------------------------------------------
>> 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


Re: Getting a zone id when inside another zone

Posted by DH <ni...@gmail.com>.
What about giving the static id to the innerZone, like following:

<div t:type="zone" t:id="innerZone" id="innerZone">
</div>

DH
----- Original Message ----- 
From: "Hugo Palma"
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, April 27, 2009 11:38 PM
Subject: Getting a zone id when inside another zone


>I have a template that looks something like this:
> 
> <div t:type="zone" t:id="outerZone">
> 
> <form t:type="form" t:zone="innerZone">
> </form>
> 
> <div t:type="zone" t:id="innerZone">
> </div>
> </div>
> 
> The problem is figuring out the id of the innerZone in order to pass
> it to the form. Because the innerZone is itself inside a zone once the
> outerZone gets updated a new id is generated to the innerZone making
> the id i passed to the form an invalid one. I also tried something
> like:
> 
> <form t:type="form" t:zone="prop:innerZone.clientId">
> 
> but it doesn't work either.
> Any ideas on how i could make this work ?
> Thanks.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
>