Re: Can a Portlet generate an image?
Dettborn <[email protected]>
| Newsgroups | gmane.comp.jakarta.pluto.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Joerg, I not sure, you can read the chapter over Resource Serving. There you can create a link which points back to itself. You can find the Specification under the folliwing link: http://ipc658.inf-swt.uni-jena.de/spec/ Best regards Torsten Joerg Heinicke schrieb: >Glenn R. Golden <ggolden <at> umich.edu> writes: > > > >>A portlet can only generate "markup fragment". The output from a >>portlet is aggregated by the portal engine into a complete "markup" >>document. Markup is usually (but not limited to) HTML. >> >>Portlets can not generate images or other binary content, as that does >>not fit in the model of fragments and markups and aggregated documents. >> >> > >Sorry for resurrecting such an old thread [1], but it's the best one I found on >this topic. > >Is everything of the above still true? Probably yes for JSR 168, but what about >the JSR 286? > >Stefan Hepper mentioned later in the thread: > > > >>However, for the problem you mentioned there is currently no solution >>besides the servlet one that Glenn mentioned, as there is no ability for >>the portlet to create a link pointing back to it that does not trigger >>the rendering of all portlets on the page. >> >> > >Shouldn't it be easy to let a request that returns non-markup "pass >through" the portal and prevent it to "trigger the rendering of all portlets on >the page"? The detection of returning markup or non-markup can be either >auto-magically or by configuration. > > > >>You can continue to use a servlet to generate your image. You would >>use a portlet to generate the html markup fragment that places the >>image into the document at a particular point. >> >> > >This is quite sub-optimal. A portlet should encapsulate some functionality. I >have the need to provide data as table and as chart. By enforcing the chart >generation to a servlet I first have to spread the functionality into 2 >components and second copy & paste at least the code to implement the same >controller logic while it would theoretically only be necessary to implement >different views. > >Is using a servlet still the recommended and necessary way? > >Regards >Jörg > >[1] http://thread.gmane.org/gmane.comp.jakarta.pluto.user/467 > > >