Pier: How to update rendered/cached instance?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Pier: How to update rendered/cached instance?

NorbertHartl
I have a pier page that contains two embedded components. The first displays the content of an object and the second displays a link that when pressed does a call: with an editor to that object.

If I alter the object in the editor and press save the page below displays the old content of the object. I think the problem is two fold. The component that displays the object uses a magritte component for that. As the memento is snapshotting the object it has still the old values. But pier seems to cache the embedded component (that holds the magritte component) as well and I didn't figure out so far how it does that.

What would be the best way to invalidate any of the cached things?

 thanks,

Norbert
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Pier: How to update rendered/cached instance?

NorbertHartl
Ok,

don't know why I didn't find the right place before. I discovered the context->componentDictionary. Now I solved it with doing

self context structure embeddedComponents do:[:each|
                (each target = self owner) ifFalse: [
                        self context componentDictionary removeKey: each]].

at save time. Is there a better way to do?

thanks,

Norbert

On 15.04.2010, at 12:39, Norbert Hartl wrote:

> I have a pier page that contains two embedded components. The first displays the content of an object and the second displays a link that when pressed does a call: with an editor to that object.
>
> If I alter the object in the editor and press save the page below displays the old content of the object. I think the problem is two fold. The component that displays the object uses a magritte component for that. As the memento is snapshotting the object it has still the old values. But pier seems to cache the embedded component (that holds the magritte component) as well and I didn't figure out so far how it does that.
>
> What would be the best way to invalidate any of the cached things?
>
> thanks,
>
> Norbert
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Pier: How to update rendered/cached instance?

Lukas Renggli
> at save time. Is there a better way to do?

There is a method PRContext>>#flushComponent: that does already that, no?

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Pier: How to update rendered/cached instance?

NorbertHartl

On 15.04.2010, at 13:00, Lukas Renggli wrote:

>> at save time. Is there a better way to do?
>
> There is a method PRContext>>#flushComponent: that does already that, no?
>
Yes, it is there.

thanks,

Norbert
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki