It's very simple. When the Grid component renders, it is keeping the book property up-to date as the components in its body render. Thus, if you look at the rendered output, you'll see an <img> element and a URL that references the component and the displayImage custom event.
Now what happens when that URL is triggered? The Image component attempts to read the book property and de-reference the binaryStream property. Well, it was the Grid components job to keep the book property up-to date *while it was rendering*, but the Grid component isn't rendering in this new request. In fact, if you look at the rendered URL you'll see that every time the Image component rendered, it rendered the same URL. How is it supposed to know from that which book's image to stream to the client? The solution is to use event context to identify the book, or in some other way, identify where the data stream is supposed to come from. On Thu, Feb 19, 2009 at 8:05 AM, Iren Tuna <iren.t...@sphinx.at> wrote: > > If there are no other ideas, whether it should work or not (and why), the way > I have done it, aside from the alternative solution hints, maybe I should > try to create a bug issue in T5 jira. For me it is still not clear, why it > does not work. Any other ideas? > > -- > iren > > > > Thiago H. de Paula Figueiredo wrote: >> >> On Sun, Feb 15, 2009 at 8:21 AM, Otho <taa...@googlemail.com> wrote: >>> One possible solution is to store the images in the filesystem instead of >>> the database and store only the filename in the db from where you can >>> construct a path. But I think that isn't compatible with your >>> requirements? >> >> Maybe a better solution would be to provide an Asset binding (like >> context and classpath) and AssetFactory, both pulling the images from >> the database. >> >> -- >> Thiago >> >> > > -- > View this message in context: > http://n2.nabble.com/-T5.0.18--Bug--%3A-Null-property-problem-with-the-custom-component-inside-a-grid-tp2324166p2353720.html > Sent from the Tapestry Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org