You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by grabarz <um...@gazeta.pl> on 2009/06/02 20:19:17 UTC

T5.1.0.5 Component's body not rendered

hi,
this is one of these 'mysterious' problems. i have a component (report)
which takes a datasource and draws a table filled with data. something
like a grid component provided by tapestry.

this is essencial part of .tml:

	<t:loop source="items" value="row">
		<tr>
            <td> test </td>
			<t:body />
		</tr>
	</t:loop>

and this is part of .tml of the page which uses my component:

	<t:report t:id="users" model="reportModel" row="userObject">
        <td>  blah blah </td>
		<td>  ${userObject.username}  </td>
	</t:report> 


it works perfectly ok. well, almost. sometimes it happens that
component's body is not drawn! precisely it is not returned inside
response to XHR which updates the component. 

i ensured that 'items' collection is not empty (<td> test </td> is drawn
correctly as many times as items.size()) and checked assigned userObject
(which is correct non-null object).

the problem is that whole the component is drawn as it should but
<t:body/> tag is _sometimes_ ignored. i cannot even reproduce this
problem easily. 

there is no @BeforeRenderBody function in my component.

could you please give me a hint where should I start investigating this
problem?

thanks a lot,
m.

 
-- 
Mess with the best, die like a rest!


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


Re: T5.1.0.5 Component's body not rendered

Posted by grabarz <um...@gazeta.pl>.
isn't it related to some kind of caching? the strange thing is that it
is fairly enough to refresh the page to get everything running
again... for a few minutes. after next few ajaxized updates
component's body is being ignored again.

i'm about to debug tapestry's core. is there any point that comes to
your mind, where i could start digging?

thanks,
m.

Howard Lewis Ship wrote on 02 Jun 2009 22:29:24 MET:

> I can't think of anything that could explain what you are seeing. Full
> and partial page rendering operate on the page structure identically.
>
> 2009/6/2 grabarz <um...@gazeta.pl>:
> > hi,
> > this is one of these 'mysterious' problems. i have a component (report)
> > which takes a datasource and draws a table filled with data. something
> > like a grid component provided by tapestry.
> >
[cut]

-- 
Mess with the best, die like a rest!


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


Re: T5.1.0.5 Component's body not rendered

Posted by Howard Lewis Ship <hl...@gmail.com>.
I can't think of anything that could explain what you are seeing. Full
and partial page rendering operate on the page structure identically.

2009/6/2 grabarz <um...@gazeta.pl>:
> hi,
> this is one of these 'mysterious' problems. i have a component (report)
> which takes a datasource and draws a table filled with data. something
> like a grid component provided by tapestry.
>
> this is essencial part of .tml:
>
>        <t:loop source="items" value="row">
>                <tr>
>            <td> test </td>
>                        <t:body />
>                </tr>
>        </t:loop>
>
> and this is part of .tml of the page which uses my component:
>
>        <t:report t:id="users" model="reportModel" row="userObject">
>        <td>  blah blah </td>
>                <td>  ${userObject.username}  </td>
>        </t:report>
>
>
> it works perfectly ok. well, almost. sometimes it happens that
> component's body is not drawn! precisely it is not returned inside
> response to XHR which updates the component.
>
> i ensured that 'items' collection is not empty (<td> test </td> is drawn
> correctly as many times as items.size()) and checked assigned userObject
> (which is correct non-null object).
>
> the problem is that whole the component is drawn as it should but
> <t:body/> tag is _sometimes_ ignored. i cannot even reproduce this
> problem easily.
>
> there is no @BeforeRenderBody function in my component.
>
> could you please give me a hint where should I start investigating this
> problem?
>
> thanks a lot,
> m.
>
>
> --
> Mess with the best, die like a rest!
>
>
> ---------------------------------------------------------------------
> 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
Director of Open Source Technology at Formos

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


Re: T5.1.0.5 Component's body not rendered

Posted by Lukasz Jazgar <lu...@gmail.com>.
Hi,

It won't help to find a cause, but I can confirm that I observe
exactly the same behaviour in my application.

Regards
Lukasz

W dniu 3 czerwca 2009 00:35 użytkownik grabarz <um...@gazeta.pl> napisał:
> hi,
> thanks for that solution!
>
> i will try to find a reason of this strange behaviour debugging
> tapestry's sources. in worst case i will give up using your workaround.
>
> best regards,
> m.
>
>
> Moritz Gmelin wrote on 02 Jun 2009 20:52:58 MET:
>
>> Hi,
>>
>> I had a very similar problem today too. Sometimes the body was
>> rendered, other times just nothing was rendered.
>>
>> My workaround was to define a block containing the body part, pass
>> this block to the "report" and have it rendered through <t:Deleget
>> to="passedBlock" />
>>
>> your report.tml would look like
>>
>> >     <t:loop source="items" value="row">
>> >             <tr>
>> >            <td> test </td>
>> >                     <t:delegate to="passedBlock" />
>> >             </tr>
>> >     </t:loop>
>>
>> the page would be
>>
>> >     <t:report t:id="users" model="reportModel" row="userObject"
>> > passedBlock="innerBlock"/>
>>          <t:block t:id="innerBlock">
>> >        <td>  blah blah </td>
>> >             <td>  ${userObject.username}  </td>
>> >     </t:block>
>>
>> you'd have to define passedBlock in report.java and innerblock in
>> page.java
>>
>> like
>>
>> @Inject
>> @Property
>> private Block passedBlock;
>>
>> Hope this helps.
>> Problems like this make me nervous. I hope someone could explain why
>> it is not working as expected.
>>
>> Regards
>>
>> Moritz
>>
>> Am 02.06.2009 um 20:19 schrieb grabarz:
>>
>> > hi,
>> > this is one of these 'mysterious' problems. i have a component
>> > (report)
>> > which takes a datasource and draws a table filled with data. something
>> > like a grid component provided by tapestry.
>> >
> [cut]
>
> --
> Mess with the best, die like a rest!
>
>
> ---------------------------------------------------------------------
> 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: T5.1.0.5 Component's body not rendered

Posted by grabarz <um...@gazeta.pl>.
hi,
thanks for that solution!

i will try to find a reason of this strange behaviour debugging
tapestry's sources. in worst case i will give up using your workaround.

best regards,
m.


Moritz Gmelin wrote on 02 Jun 2009 20:52:58 MET:

> Hi,
>
> I had a very similar problem today too. Sometimes the body was
> rendered, other times just nothing was rendered.
>
> My workaround was to define a block containing the body part, pass
> this block to the "report" and have it rendered through <t:Deleget
> to="passedBlock" />
>
> your report.tml would look like
>
> > 	<t:loop source="items" value="row">
> > 		<tr>
> >            <td> test </td>
> > 			<t:delegate to="passedBlock" />
> > 		</tr>
> > 	</t:loop>
>
> the page would be
>
> > 	<t:report t:id="users" model="reportModel" row="userObject"
> > passedBlock="innerBlock"/>
> 	   <t:block t:id="innerBlock">
> >        <td>  blah blah </td>
> > 		<td>  ${userObject.username}  </td>
> > 	</t:block>
>
> you'd have to define passedBlock in report.java and innerblock in
> page.java
>
> like
>
> @Inject
> @Property
> private Block passedBlock;
>
> Hope this helps.
> Problems like this make me nervous. I hope someone could explain why
> it is not working as expected.
>
> Regards
>
> Moritz
>
> Am 02.06.2009 um 20:19 schrieb grabarz:
>
> > hi,
> > this is one of these 'mysterious' problems. i have a component
> > (report)
> > which takes a datasource and draws a table filled with data. something
> > like a grid component provided by tapestry.
> >
[cut]

-- 
Mess with the best, die like a rest!


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


Re: T5.1.0.5 Component's body not rendered

Posted by Moritz Gmelin <mo...@gmx.de>.
Hi,

I had a very similar problem today too. Sometimes the body was  
rendered, other times just nothing was rendered.

My workaround was to define a block containing the body part, pass  
this block to the "report" and have it rendered through <t:Deleget  
to="passedBlock" />

your report.tml would look like

> 	<t:loop source="items" value="row">
> 		<tr>
>            <td> test </td>
> 			<t:delegate to="passedBlock" />
> 		</tr>
> 	</t:loop>

the page would be

> 	<t:report t:id="users" model="reportModel" row="userObject"  
> passedBlock="innerBlock"/>
	   <t:block t:id="innerBlock">
>        <td>  blah blah </td>
> 		<td>  ${userObject.username}  </td>
> 	</t:block>

you'd have to define passedBlock in report.java and innerblock in  
page.java

like

@Inject
@Property
private Block passedBlock;

Hope this helps.
Problems like this make me nervous. I hope someone could explain why  
it is not working as expected.

Regards

Moritz

Am 02.06.2009 um 20:19 schrieb grabarz:

> hi,
> this is one of these 'mysterious' problems. i have a component  
> (report)
> which takes a datasource and draws a table filled with data. something
> like a grid component provided by tapestry.
>
> this is essencial part of .tml:
>
> 	<t:loop source="items" value="row">
> 		<tr>
>            <td> test </td>
> 			<t:body />
> 		</tr>
> 	</t:loop>
>
> and this is part of .tml of the page which uses my component:
>
> 	<t:report t:id="users" model="reportModel" row="userObject">
>        <td>  blah blah </td>
> 		<td>  ${userObject.username}  </td>
> 	</t:report>
>
>
> it works perfectly ok. well, almost. sometimes it happens that
> component's body is not drawn! precisely it is not returned inside
> response to XHR which updates the component.
>
> i ensured that 'items' collection is not empty (<td> test </td> is  
> drawn
> correctly as many times as items.size()) and checked assigned  
> userObject
> (which is correct non-null object).
>
> the problem is that whole the component is drawn as it should but
> <t:body/> tag is _sometimes_ ignored. i cannot even reproduce this
> problem easily.
>
> there is no @BeforeRenderBody function in my component.
>
> could you please give me a hint where should I start investigating  
> this
> problem?
>
> thanks a lot,
> m.
>
>
> -- 
> Mess with the best, die like a rest!
>
>
> ---------------------------------------------------------------------
> 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