0 Replies Latest reply on Aug 25, 2008 2:10 AM by Terry

    rich:modalPanel as Print Preview

    Terry Apprentice

      Hi,

      I'm attempting to use rich:modalPanel as a print preview window. It is proving to be impossible to make to do following two things:

      - It should allow to scroll contents when contents are more than one page long.

      - When printed it should print all pages.

      Has anyone done this or can give any clues?

      If I enable scrollbars on div tag just inside the rich:modalPanel; the browser shows scrollbars; and knows the scroll position when scrolling up/down; but modalPanel does not scroll.

      And even though browser knows there are many pages of contents; on printing it only prints what it can fit on the screen.

      template-print.xhtml
      -----------------------
      
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:s="http://jboss.com/products/seam/taglib">
      <head>
       ...
      </head>
      <body>
       <rich:modalPanel id="popupPreview" showWhenRendered="true" left="10" top="10" autosized="true">
       <div id="document">
       <ui:include src="/layout/header-print.xhtml"/>
       <div id="container">
       <div id="content">
       <ui:insert name="content"/>
       </div>
       </div>
       </div>
       </rich:modalPanel>
      </body>
      </html>
      
      




      Thanks you