printing p:dataTable

UI Components for JSF
Post Reply
ttruong
Posts: 109
Joined: 01 Mar 2010, 12:50

24 Mar 2010, 17:16

When I use p:printer then the data table is printed correctly. Unfortunately after the printing the table is empty. Inside only the table only the text "Loading..." appears. Doing a manual refresht the table is fine again.

Is this a known bug?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

25 Mar 2010, 15:32

What do you mean by after the printing?

You click print and then what happens, page is reloaded or the table contents in printed documents is empty.

A screenshot can help as well.

eziz
Posts: 33
Joined: 15 Apr 2012, 13:08

30 May 2012, 18:16

did you slove this problem? and How we can print Article and article's comment

Code: Select all

 <p:panel  header="Read Article" id="content" >

                        <p:commandButton id="print" value="Print" type="button" icon="ui-icon-print" rendered="#{login.loggedIn}" >  
                            <p:printer target="content:readArticle"/>  
                        </p:commandButton> 

                        <h:dataTable  id="readArticle" styleClass="contentTable" value="#{articleBean.getByArticleID(param.id)}" var="a">
                            <p:column >
                                <p:graphicImage id="avatar" value="/resources/images/eziz.png"/>

                                <h:outputLabel styleClass="writer" value="User :#{a.userName}" /> 
                                <h:outputLabel styleClass="writer" value="Category :#{a.categoryName}" />
                                <h:outputLabel styleClass="writer" value="Article :#{a.articleName}" />
                                <p:editor  styleClass="readerArea" disabled="true" value="#{a.articleBody}" />
                            </p:column>
                        </h:dataTable>
                    </p:panel>

this code is not correct bu how we can print:Username,categoryname and article body same page?
  • Netbeans
    MySql
    JSP and Primefaces

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

30 May 2012, 18:58

- Don't (ab)use two year old old posts
- you do not even use p:datatable but h:datatable
- how can we help you if the code you producescis not good. How should we know what the problem is then (screenshots?)
- for the last time: read viewtopic.php?f=3&t=1194 and act accordingly

Cheers

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests