Got it! thanks to both of you and the examples. Wow - onActivate can return an Object :) and nice to know about ComponentResources.
-Luther On Wed, Mar 11, 2009 at 10:15 AM, Elmer Smith <esm...@venterraliving.com>wrote: > I have a component based off of the example Thiago mentions. The just > of it is: > > - a page ViewImage that has an activation context of a d/b related ID > - that pages onActivate returns a StreamResponse > - the stream response is created by loading bytes from the d/b using > the ID passed in the activation context > - a component that uses a template with an <img /> tag > - the component provides a link to the ViewImage page; the link can be > constructed to ask the containing component (or page) to provide the > byte stream or it will provide a default > > I use this all over to render images that are stored in the database. > > Hope that helps, > Elmer > > -----Original Message----- > From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] > Sent: Wednesday, March 11, 2009 9:52 AM > To: Tapestry users > Subject: Re: img tag (src) > > Maybe > http://wiki.apache.org/tapestry/Tapestry5HowToCreateASimpleGraphComponen > t > is an example that can be adapted to what you need. > > > So, from a different perspective, what I really want in my page is > somethin like > > Object onRender() > > { > > StreamResponse = ... > > <blah/> > > return streamResponse; > > } > > Instead of onRender(), use onActivate(). ;) > > -- > Thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > This message (including any attachments) is intended only for the use of > the individual or entity to whom it is addressed and may contain information > that is non-public, proprietary, privileged, confidential, and exempt from > disclosure under applicable law or may constitute attorney work product. If > you are not the intended recipient, you are hereby notified that any use, > dissemination, distribution, or copying of this communication is strictly > prohibited. If you have received this communication in error, please notify > us immediately by telephone and (i) destroy this message if a facsimile or > (ii) delete this message immediately if an electronic communication. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >