Today I checked in a couple of changes to the RI Sandbox file download component that will make the component more flexible, and, therefore, more usable.
Before these changes, the only way the component could be used was with one of two "methods:" "inline" (e.g., a PDF embedded in the page), or "download" (which was a link with a text anchor). While this worked, it was pretty limiting. What if the page author wants the link to be a picture, or if he wants the file download to start from on onChange even handler? Before today, that wasn’t possible. Today, though, I committed support for child components, as well as support for creating an EL variable that can be used by any child components as they please.
With the first change, something like is now possible:
which will render an anchor, using the the download.jpg image as its content, that will deliver the HelloWorld PDF to the client when clicked. (In theory, anything can be used inside <risb:download />, though I’ve only tested with text and images.)
But what if you want a dynamically generated image to be displayed? With the second change, this is now possible:
At IEC, we’re pretty excited about these changes. We’re using both the download and multi-file upload components in a couple of different high profile projects, which means that they’re stable enough for production, and they also get a good deal of real world scrutiny, resulting in changes like these above.
These changes can be picked up from the RI CVS HEAD branch.