Trinidad does have quite a bit of support for printable pages already,
albeit not via CSS media elements.  Instead, if RequestContext.getOutputMode
()
returns "printable", we'll render alternative, printable content.

You make it return "printable" via trinidad-config.xml.
For example, if you had:

 <output-mode>#{yourBean.printableMode ? "printable" : null</output-mode>

... then we'd switch into printable mode when yourBean's
isPrintableMode() method returned true.

-- Adam



On 3/15/07, Daniel Hannum <[EMAIL PROTECTED]> wrote:

Good point. When I said "improved", I only was going by the last line in
the blog I pointed to:

"Note that future plans for ADF Faces include printable pages so that
the CSS solution is only temporarily for the time being. To print a page
you can use the document.print(); JavaScript command from a link on the
JSP page."

Which made me think that the Trinidad guys might have great plans for
printable pages.

It sounds as though IF I can convince the powers that be that a
printable page should only print the selected page of results, CSS is
great. But if they insist on seeing the whole table, I have to use my
more-hackish requestScope parameter solution.

Thanks.

-----Original Message-----
From: Laurie Harper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 14, 2007 5:31 PM
To: [email protected]
Cc: Laurie Harper
Subject: Re: Tweaking af:table for printable pages

On 14-Mar-07, at 4:06 PM, Daniel Hannum wrote:
> Hi,
>
> I want to make a printable page, and I've seen the CSS/media method
> described here:
>
> http://www.orablogs.com/fnimphius/archives/001830.html
>
> I'm fairly certain it will work. But, I have a page with an
> af:table in
> it, and I'd like it to not page the results (size="0") if we're
> printable. Up until now, I've been setting and checking a variable in
> requestScope to know to set size to 0 at the right time. If I use the
> CSS method, I would need a way to check the media type via EL.
>
> Can this be done? Or am I up a creek until ADF has improved printable
> page support?

What would 'improved' support mean? You can't check the media type
via EL since the media type would depend on what the browser is doing
with the page *after* you've sent it. Printing the page wont re-
request it with a 'different media type'. It'll just print it as-is,
with different styles applied.

L.
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/




Reply via email to