Hy! The code, looks good to me, the problem maybe in the action that captures the argument for the chain, to confirm that, please check that all the object's data attributes generated right, and check the debug output for the server to see if all the object's requests, succeeds ( you can see the error messages that catalyst generates for the images, if you change the object's to iframes... so then the images may display ugly, but you can see the error messages it they sent instead of an image...
On 01/01/2010 09:30 PM, "Jürgen Hensch" wrote:
> Hi,
>
> I am developing a small "media bookshelf" where I want to display in a
> matrix-like layout - among other informations - covers in png format (which
> are saved in a BLOB in my Mysql-DB). I have something like [1] in my mind.
> The problem I have now is, that only ONE cover is displayed at a time. The
> relevant code looks like this:
>
> matrix.tt2:
> -----------
>
> <div class="table">
> <div class="tr">
> [% FOREACH m IN medien %]
> [% IF ! (loop.count mod 4) %]
> </div>
> <div class="tr">
> [% END %]
> <div class="td">
> <div class="table">
> <div class="tr">
> <div class="td"><object type="[% m.mime %]" data="[%
> c.uri_for(c.controller.action_for('cover'), [m.id]) %]" width="236"
> height="300"></object></div>
> </div>
> <div class="tr">
> <div class="td">[% m.titel %]</div>
> </div>
> <div class="tr">
> <div class="td">[% m.typ %]</div>
> </div>
> </div>
> </div>
> [% END %]
> </div>
> </div>
>
> Medien.pm:
> ----------
>
> sub cover :Chained('object') :PathPart('cover') :Args(0) {
> my ($self, $c) = @_;
>
> my $medium = $c->stash->{object};
> $c->response->header('Content-Type' => $medium->mime . ";
> charset=\"ISO-8859-1\"");
> $c->response->write($medium->cover);
> }
>
> I think I now where the problem is, but I do not know how I can fix it
> properly: The cover action in my Medien controller works with $c->response
> and therefor creates a new response for each object-tag in my tt2. So only
> the "last" cover is displayed.
>
> Can anybody help me on how I get all covers displayed simultaneously?
>
> Thanks
>
> Jürgen
>
> [1]
> http://forum.computerbild.de/attachments/benutzer-tutorials/musikverwaltung-tipps-tricks-problemloesungen-itunes-9073d1232463324-bild6.jpg
>
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
