-
1. Re: Rendering pdf files through a4j:mediaOutput
alexsmirnov Apr 5, 2007 12:43 PM (in response to tomarenz)No problem for a big size, mediaOutput component generate content in a separate request.
If you have a big pdf files, set the 'cacheable' attribute to 'false', to avoid store generated content in the server-side cache.
On other hand, you can setup cache to use file storage ( put in classpath oscache.properties file, and follow instructions on oscache.properties ). -
2. Re: Rendering pdf files through a4j:mediaOutput
tomarenz Apr 5, 2007 1:32 PM (in response to tomarenz)Thanks Alex, that's great. Finally I ended my long search for a multimedia component avoiding that old dirty trick of writing directly on the response stream.
One more question, though: is the attribute "value" mandatory ? For blob rendering all I need is "createContent" which binds to a bean method. Such bean is presumed to know what to do, writing data to the passed stream. Why "value" in this game ? Can I skip it ?
-- Renzo -
3. Re: Rendering pdf files through a4j:mediaOutput
sergeysmirnov Apr 5, 2007 3:13 PM (in response to tomarenz)value similar to parameter of the method. It is available in the createContent. Why not use value to pass a name of the pdf you want to create for example?
if 'cacheable' attribute set to true (by default), the same value for different calls causes taking resource from the cache instead of invoking "createContent".
P.S. a4j:mediaOutput has two parameters - data and value. value is an alias for data. So, if you use data, no reason to use value and visa versa. -
4. Re: Rendering pdf files through a4j:mediaOutput
tomarenz Apr 6, 2007 4:31 AM (in response to tomarenz)I can't find any "data" attribute in dev. guide description of mediaOutput.
Maybe it's a bit misaligned, and on the other hand it says "IMPORTANT: Since serialized data stored in URI, avoid using big objects".
I'm very surprised that I couldn't find around any JSF component library capable of generating a HTML chunk like this:
or alike using . It's likely I miss some point, though. -
5. Re: Rendering pdf files through a4j:mediaOutput
tomarenz Apr 6, 2007 4:41 AM (in response to tomarenz)Oops, html was stripped. I meant "object data="/filename.pdf" type='application/pdf' ". Looks so simple.
-
6. Re: Rendering pdf files through a4j:mediaOutput
luuzz Apr 8, 2007 5:17 PM (in response to tomarenz)Hello,
Would you tell me please which element attribute you used to display pdf.
I have tried object, the html output is generated but nothing appear.
Best regards,
Alassane -
7. Re: Rendering pdf files through a4j:mediaOutput
ilya_shaikovsky Apr 9, 2007 7:12 AM (in response to tomarenz)Seems like there is some problems with the component. http://jira.jboss.com/jira/browse/AJSF-34 added to jira for investigation.
-
8. Re: Rendering pdf files through a4j:mediaOutput
luuzz Apr 10, 2007 8:53 PM (in response to tomarenz)Hello,
I Have notice that even with html, the object does not appear if width and height attributes are not set.
The mediaOutput Component does not generate those attributes.
Is There a way to set them using javascript or something like that. -
9. Re: Rendering pdf files through a4j:mediaOutput
maxmustang Oct 29, 2007 9:31 AM (in response to tomarenz)Hello all,
I'm wondering if meanwhile anyone in here successfully uses this medaoutput for pdf generation, and if yes, how exactly (source would be best).
Many Thanks & Greetings, Max -
10. Re: Rendering pdf files through a4j:mediaOutput
sriramsudheer Mar 13, 2008 10:25 PM (in response to tomarenz)Hi Renzo,
You told you are sucessful using some tag, but could tell what tag is that and how you resolved the issue, Because i am having the same trouble and its not even call the underlying method