You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fanzhen <fa...@hotmail.com> on 2010/09/21 04:23:21 UTC

T5 component in page could not refresh when page refresh!

  Have a layout component which used by pages , and in layout component 
there are some data operation related to finding and showing some data 
from database.
the problem is that ,
when some operation was done in my page (actually ,updating data in 
database),data in page refreshed, but data in layout component don't 
refresh.
I mean , is there some way to make layout component refresh  ?

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


Re: T5 component in page could not refresh when page refresh!

Posted by Josh Canfield <jo...@gmail.com>.
>>> when some operation was done in my page (actually ,updating data in
>>> database),data in page refreshed, but data in layout component don't
>>> refresh.

If you are getting old data in the layout but new data in the page
then there is something holding on to the data in the layout.

Are you updating the page using AJAX?
Are you @Persist'ing things in the Layout?

Josh

On Mon, Sep 20, 2010 at 8:18 PM, Fanzhen <fa...@hotmail.com> wrote:
>
>  just as what you do in your page ,
>
> 1, inject tapestry or spring service which will be used pull data from your
> database or something else;
> 2, define @property or getXXX() method which will be displayed in your
> component tml .
> 3, and at last just use what you have defined in your component .
>
>
> On 2010-9-21 11:09, Josh Canfield wrote:
>>
>> How are you getting the data the data in your layout? Can you provide some
>> code as an example?
>>
>> -- Josh
>>
>> On Sep 20, 2010, at 7:23 PM, Fanzhen<fa...@hotmail.com>  wrote:
>>
>>> Have a layout component which used by pages , and in layout component
>>> there are some data operation related to finding and showing some data from
>>> database.
>>> the problem is that ,
>>> when some operation was done in my page (actually ,updating data in
>>> database),data in page refreshed, but data in layout component don't
>>> refresh.
>>> I mean , is there some way to make layout component refresh  ?
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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


Re: T5 component in page could not refresh when page refresh!

Posted by Fanzhen <fa...@hotmail.com>.
  just as what you do in your page ,

1, inject tapestry or spring service which will be used pull data from 
your database or something else;
2, define @property or getXXX() method which will be displayed in your 
component tml .
3, and at last just use what you have defined in your component .


On 2010-9-21 11:09, Josh Canfield wrote:
> How are you getting the data the data in your layout? Can you provide some code as an example?
>
> -- Josh
>
> On Sep 20, 2010, at 7:23 PM, Fanzhen<fa...@hotmail.com>  wrote:
>
>> Have a layout component which used by pages , and in layout component there are some data operation related to finding and showing some data from database.
>> the problem is that ,
>> when some operation was done in my page (actually ,updating data in database),data in page refreshed, but data in layout component don't refresh.
>> I mean , is there some way to make layout component refresh  ?
>>
>> ---------------------------------------------------------------------
>> 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: T5 component in page could not refresh when page refresh!

Posted by Josh Canfield <jo...@gmail.com>.
How are you getting the data the data in your layout? Can you provide some code as an example?

-- Josh

On Sep 20, 2010, at 7:23 PM, Fanzhen <fa...@hotmail.com> wrote:

> 
> Have a layout component which used by pages , and in layout component there are some data operation related to finding and showing some data from database.
> the problem is that ,
> when some operation was done in my page (actually ,updating data in database),data in page refreshed, but data in layout component don't refresh.
> I mean , is there some way to make layout component refresh  ?
> 
> ---------------------------------------------------------------------
> 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 component in page could not refresh when page refresh!

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 21 Sep 2010 00:20:04 -0300, Fanzhen <fa...@hotmail.com>  
wrote:

>   hey, friend, I want to know how to get a not cached version of my page

Tapestry doesn't cache page renders.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Re: T5 component in page could not refresh when page refresh!

Posted by Fanzhen <fa...@hotmail.com>.
  hey, friend, I want to know how to get a not cached version of my page

On 2010-9-21 10:45, Thiago H. de Paula Figueiredo wrote:
> On Mon, 20 Sep 2010 23:23:21 -0300, Fanzhen <fa...@hotmail.com> 
> wrote:
>
>>   Have a layout component which used by pages , and in layout 
>> component there are some data operation related to finding and 
>> showing some data from database. the problem is that ,
>> when some operation was done in my page (actually ,updating data in 
>> database),data in page refreshed, but data in layout component don't 
>> refresh. I mean , is there some way to make layout component refresh  ?
>
> You don't need to do anything. When some page using your Layout 
> component is requested, Tapestry renders your page again, including 
> the components it uses. Just make sure you're not getting a cached 
> version of your page and that your pages and components correctly pull 
> data from the database.
>


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


Re: T5 component in page could not refresh when page refresh!

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 20 Sep 2010 23:23:21 -0300, Fanzhen <fa...@hotmail.com>  
wrote:

>   Have a layout component which used by pages , and in layout component  
> there are some data operation related to finding and showing some data  
> from database. the problem is that ,
> when some operation was done in my page (actually ,updating data in  
> database),data in page refreshed, but data in layout component don't  
> refresh. I mean , is there some way to make layout component refresh  ?

You don't need to do anything. When some page using your Layout component  
is requested, Tapestry renders your page again, including the components  
it uses. Just make sure you're not getting a cached version of your page  
and that your pages and components correctly pull data from the database.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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