changes.
| h2. Overview |
| _Since 3.0_ |
| |
| The {{<ace:printer>}} tag sends a specific component to the printer, avoiding printing the full page. It must be inside {{<h:commandButton>}} or {{<h:commandLink>}}. |
| |
| {tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=printerBean] of this component, complete with source code.{tip} |
| |
| |
| h2. Getting Started |
| |
| This is a typical usage example of the printer component. |
| {panel} |
| {code:xml|borderStyle=dashed} |
| <h:graphicImage id="image" value="#{bean.imagePath}" /> |
| |
| <h:commandLink> |
| <h:outputText value="print image"/> |
| <ace:printer for="image"/> |
| </h:commandLink> |
| {code} |
| {panel} |
| |
| h2. Attributes |
| {tip:title=TagLib Documentation}For reference, the taglib documentation for this component is available [here|http://www.icefaces.org/docs/v4_latest/ace/tld/ace/printer.html].{tip} |
| {panel} |
| *for* Specifies the id of the component to print. |
| {panel} |
| |
| h2. Client Behavior Events |
| |
| | action | Fired when the parent component is clicked or activated via the keyboard (default event). | |
| |
| {tip}Prior to 4.0 this event was named "activate". The "activate" event name is now deprecated but treated as an alias for "action" for backwards compatibility with existing applications.{tip} |
| |
| h2. JavaScript APIs / Client Behaviours |
| |
|  | Javascript callbacks can be supplied in the {{onStart}}, {{onError}}, {{onSuccess}}, and {{onComplete}} attributes of the {{<ace:ajax />}} tag for the {{action}} event. The {{onStart}} callback must explicitly return true if the ajax event is to continue. |
| | h4. ICEfaces 3.x |
| |
 | | The client side component object is exposed through the global variable name specified in the *widgetVar* attribute. |
| |
| h4. ICEfaces 4+ |
| |
| The "widgetVar" attribute on the ACE components has been removed in ICEfaces 4 and in its place a new "ice.ace.instance()" client JavaScript object lookup API has been introduced. The reason for this change is to enable lazy-initialization of the ACE component JavaScript objects to improve runtime performance and reduce browser memory use. |
| |
| {code}var widget = ice.ace.instance('frm:componentId);{code} |
| |
| {tip}The _ice.ace.instance_ function requires the _full_ client id of the component to be specified, such as "j_idt77:componentId" instead of just "componentId". To reduce the complexity of working with complete IDs with this function it may be preferable in some cases to use {{prependId="false"}} in the enclosing form (e.g. _<h:form prependId="false">_).{tip} |
| |
| {info}This component doesn't have a client-side API made specifically to be used by application developers. However, the component's internal methods and variables can be accessed in this way, including the underlying jQuery object and objects from underlying Javascript libraries (if applicable), and can be used for whatever purpose a developer might have in mind. |
| {info} |
| |
| {tip}Javascript callbacks can be supplied in the {{onStart}}, {{onError}}, {{onSuccess}}, and {{onComplete}} attributes of the {{<ace:ajax />}} tag for the {{action}} event. The {{onStart}} callback must explicitly return true if the ajax event is to continue.{tip} |
| |
| h2. Keyboard and ARIA support |
| |
| There is no specific keyboard or ARIA support for this component. |
| |
| h2. CSS Classes |
| |
| This component uses no CSS classes. |
| |
| h2. Known Issues |
| |
| {panel} |
| On Firefox browsers, some large objects on the page might be cut off and not printed to a second page, if they span more than one page. This is a known issue with the Firefox browser itself with elements that are displayed inline (e.g. display:inline; or display:inline-block; ). To avoid this issue, simply make sure the component or HTML element that you want to print has display:block; in its style attribute. |
| {panel} |
| |
| h2. Other Resources |
| |
| None. |