Yep, sounds like you understand correctly. I yanked the onImage event out of
the component and put it into the onActivate of a new page (ViewImage) and
replaced the actionlink with a pagelink. That works great and it also has
the added benefit of providing a better browser caching experience because
path to the image is the same no matter what page the dynamic image is
loaded from.

Josh

On 8/21/07, Nick Westgate <[EMAIL PROTECTED]> wrote:
>
> If I understand you correctly (the code == 1000 words) we did a similar
> thing for a dynamic XML source - just made a new page for the component's
> data source and returned the XML from onActivate.
>
> Chers,
> Nick.
>
>
> Josh Canfield wrote:
> > I thought I had a pretty slick dynamic image component using the
> examples
> > from the list and wiki. Recently I noticed a performance problem and
> tracked
> > it to excess database access. It seems that whatever page I embed the
> image
> > component in gets fully re-loaded when the onImage action is trigged.
> When I
> > discovered this I was using onActivate in my page class to load some
> data
> > from the database. I switched to beginRender hoping that since I wasn't
> > actually rendering the page it wouldn't get called, but that was wrong.
> >
> > I suppose that it makes sense to me that these methods would get called
> for
> > cases where the component is doing something with data in the page, but
> in
> > this case it doesn't. So, the question is; do I refactor and upgrade my
> > Image Component to an Image page? Or is there a better design that I
> haven't
> > seen/thought of yet?
> >
> > I guess the more I think about the problem a separate page, or a filter
> of
> > some kind (haven't delved into that part of T5 yet) might be more
> > appropriate for rendering the bytes for the dynamic image as it's really
> not
> > related to the page that contains it per se...
> >
> > Thanks,
> > Josh
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to