[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printing only part of the jsf primefaces page

Posted on 2014-01-15
2
Medium Priority
?
3,092 Views
Last Modified: 2014-03-14
Hi,

I have a print button as below

  <p:commandButton id="printit" value="Print" type="button" icon="icn-print">
                    <p:printer target=":topForm:data" />
                </p:commandButton>

Open in new window


when i click print button only top half of the page is getting printed and bottom half is pushed to next page. How do i fix this issue.

please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
1 Comment
 
LVL 7

Accepted Solution

by:
gudii9 earned 0 total points
ID: 39805204
i referred below link
http://www.primefaces.org/showcase/ui/printer.jsf 
I have two separate panel grids with different ids panelGridID1 and panelGridID2 which i need to print out.(which basically avoids header and left navigation menu but only prints these two panel grids alone)


When i gave as below with one panel grid id (panelGridID1 ) it worked perfect.


<p:commandButton id="printId" value="Print Me" type="button" icon="printicon">
<p:printer target=":mainForm:panelGridID1" />
</p:commandButton
when i tried to give second panel grid id(panelGridID2) as well to print as below getting error as javax.faces.FacesException: Cannot find component :mainForm:panelGridid2 in view.

<p:commandButton id="printId" value="Print Me" type="button" icon="printicon">
<p:printer target=":mainForm:panelGridID1" />
<p:printer target=":mainForm:panelGridID2" />
</p:commandButton

can you please advise how to resolve this issue.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month19 days, 15 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question