2013-02-21 171 views
0

我在ICEfaces中很安靜。我使用的版本是3.0.0。使用ace打印ICEfaces:打印機

我想用ace打印機打印一個網頁。

我的頁面包含一個帶有垂直滾動條的數據表。

我的問題是它只打印在瀏覽器上可見的頁面部分。

它不打印整個數據表。

我同意,根據ace:printer的規格,提到「在表格的情況下,只會顯示可見的列/行/面板。」

我應該如何打印整個頁面。

在此先感謝。

回答

0

這是一種解決方法我做的:

  1. 有一個Ajax監聽
<h:commandLink id="printImgLnk1"> 
<h:graphicImage id="printerImg1" 
value="/images/printIcon.png" 
alt="Print" 
style="border: 0 none;" /> 
<h:outputText id="printAll" value="Print ALL" style="text-decoration:none" /> 
<ace:ajax event="click" execute="@this" listener="#{backingBean.printListener}"/> 
</h:commandLink> 

所以,在你的後端bean中的布爾打印:可以說布爾打印= FALSE;

現在聽衆:

public void printListener(AjaxBehaviorEvent e){ 
setPrint(true); 
} 
現在

在.xhtml在數據表中存在,對於滾動屬性做到這一點:

scrollable='#{!backingBean.print}' 

謝謝!