You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Juan Alba <ju...@condortech.com.ar> on 2012/05/17 22:19:00 UTC

Doubt about tapx expando

I am trying to use it in a loop:

<div t:type="loop" t:source="myObjectList" t:value="myObject">
<t:tapx.expando t:title="prop:myObject.name">
<div class="acordeon">
${myObject.name}
</div>
</t:tapx.expando>
</div>

The loop goes well, the title are also fine, but when I get in the div
myObject is null.
Anyone knows why?



Regards!

Re: Doubt about tapx expando

Posted by Howard Lewis Ship <hl...@gmail.com>.
One of the challenges of Tapestry is that it does so much,
automatically, behind the scenes, that it is confusing when it doesn't
do everything automatically!

On Thu, May 17, 2012 at 1:44 PM, Juan Alba <ju...@condortech.com.ar> wrote:
> Thanks a lot for the explanation.
>
> Regards.
>
> On Thu, May 17, 2012 at 5:29 PM, Howard Lewis Ship <hl...@gmail.com> wrote:
>
>> You have to think in terms of what Tapestry knows when it renders and
>> what it knows when the later request comes up.
>>
>> The issue here is that the myObject property is known, and changing,
>> during the course of the render. It then reverts to null.
>>
>> In the latest Ajax request triggered by the Expando, the property is
>> still null. There's you error.
>>
>> Many components, such as EventLink and ActionLink, include a context
>> parameter that allows you to save some per-link related state into the
>> URL.  Expando doesn't do this (though it could be added).
>>
>> What you really need is either a more complicated component that can
>> handle this later-request-state issue OR a simpler component that does
>> all the rendering initially, but leaves much of the output hidden.
>>
>>
>> On Thu, May 17, 2012 at 1:19 PM, Juan Alba <ju...@condortech.com.ar>
>> wrote:
>> > I am trying to use it in a loop:
>> >
>> > <div t:type="loop" t:source="myObjectList" t:value="myObject">
>> > <t:tapx.expando t:title="prop:myObject.name">
>> > <div class="acordeon">
>> > ${myObject.name}
>> > </div>
>> > </t:tapx.expando>
>> > </div>
>> >
>> > The loop goes well, the title are also fine, but when I get in the div
>> > myObject is null.
>> > Anyone knows why?
>> >
>> >
>> >
>> > Regards!
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Re: Doubt about tapx expando

Posted by Juan Alba <ju...@condortech.com.ar>.
Thanks a lot for the explanation.

Regards.

On Thu, May 17, 2012 at 5:29 PM, Howard Lewis Ship <hl...@gmail.com> wrote:

> You have to think in terms of what Tapestry knows when it renders and
> what it knows when the later request comes up.
>
> The issue here is that the myObject property is known, and changing,
> during the course of the render. It then reverts to null.
>
> In the latest Ajax request triggered by the Expando, the property is
> still null. There's you error.
>
> Many components, such as EventLink and ActionLink, include a context
> parameter that allows you to save some per-link related state into the
> URL.  Expando doesn't do this (though it could be added).
>
> What you really need is either a more complicated component that can
> handle this later-request-state issue OR a simpler component that does
> all the rendering initially, but leaves much of the output hidden.
>
>
> On Thu, May 17, 2012 at 1:19 PM, Juan Alba <ju...@condortech.com.ar>
> wrote:
> > I am trying to use it in a loop:
> >
> > <div t:type="loop" t:source="myObjectList" t:value="myObject">
> > <t:tapx.expando t:title="prop:myObject.name">
> > <div class="acordeon">
> > ${myObject.name}
> > </div>
> > </t:tapx.expando>
> > </div>
> >
> > The loop goes well, the title are also fine, but when I get in the div
> > myObject is null.
> > Anyone knows why?
> >
> >
> >
> > Regards!
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Doubt about tapx expando

Posted by Howard Lewis Ship <hl...@gmail.com>.
You have to think in terms of what Tapestry knows when it renders and
what it knows when the later request comes up.

The issue here is that the myObject property is known, and changing,
during the course of the render. It then reverts to null.

In the latest Ajax request triggered by the Expando, the property is
still null. There's you error.

Many components, such as EventLink and ActionLink, include a context
parameter that allows you to save some per-link related state into the
URL.  Expando doesn't do this (though it could be added).

What you really need is either a more complicated component that can
handle this later-request-state issue OR a simpler component that does
all the rendering initially, but leaves much of the output hidden.


On Thu, May 17, 2012 at 1:19 PM, Juan Alba <ju...@condortech.com.ar> wrote:
> I am trying to use it in a loop:
>
> <div t:type="loop" t:source="myObjectList" t:value="myObject">
> <t:tapx.expando t:title="prop:myObject.name">
> <div class="acordeon">
> ${myObject.name}
> </div>
> </t:tapx.expando>
> </div>
>
> The loop goes well, the title are also fine, but when I get in the div
> myObject is null.
> Anyone knows why?
>
>
>
> Regards!



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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