org.icefaces.ace.component.printer

## Class PrinterBase

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - org.icefaces.ace.component.printer.PrinterBase

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, IceClientBehaviorHolder, IPrinter
  Direct Known Subclasses:
    Printer

      public abstract class PrinterBase
      extends javax.faces.component.UIComponentBase
      implements IPrinter, IceClientBehaviorHolder

  Printer allows sending a specific JSF component to the printer, not the whole page. It needs to be nested inside an h:commandButton or h:outputLink component. Note: Support for printing an ace:richTextEditor component is limited to only printing its contents and only works if the editor component is specifically targeted (not if its container is targeted).

  For more information, see the Printer Wiki Documentation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `PrinterBase.PropertyKeys`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `COMPONENT_TYPE`
    `static java.lang.String` | `RENDERER_TYPE`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrinterBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addClientBehavior(java.lang.String eventName, javax.faces.component.behavior.ClientBehavior behavior)`
    `java.lang.String` | `getDefaultEventName()`
    `java.lang.String` | `getDefaultExecute(java.lang.String event)`
    `java.lang.String` | `getDefaultRender(java.lang.String event)`
    `java.util.Collection<java.lang.String>` | `getEventNames()`
    `java.lang.String` | `getFamily()`
    `java.lang.String` | `getFor()` Return the value of the `for` property.
    `java.lang.String` | `getListenerArgument(java.lang.String event)`
    `boolean` | `isIgnoreValidation()` Return the value of the `ignoreValidation` property.
    `java.lang.Boolean` | `isPassedValidation()` Return the value of the `passedValidation` property.
    `protected boolean` | `isPropertySet(java.lang.String finder)`
    `void` | `setFor(java.lang.String forValue)` Set the value of the `for` property.
    `void` | `setIgnoreValidation(boolean ignoreValidation)` Set the value of the `ignoreValidation` property.
    `void` | `setPassedValidation(java.lang.Boolean passedValidation)` Set the value of the `passedValidation` property.
    `void` | `setValueExpression(java.lang.String name, javax.el.ValueExpression binding)`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, visitTree`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder

      `getClientBehaviors`

- - ### Field Detail

    - #### COMPONENT_TYPE

          public static final java.lang.String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### RENDERER_TYPE

          public static final java.lang.String RENDERER_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PrinterBase

          public PrinterBase()

  - ### Method Detail

    - #### getFamily

          public java.lang.String getFamily()

      Specified by:
        `getFamily` in class `javax.faces.component.UIComponent`

    - #### setFor

          public void setFor(java.lang.String forValue)

      Set the value of the `for` property.

      Contents: Specifies the id of the component to print.

      Specified by:
        `setFor` in interface `IPrinter`

    - #### getFor

          public java.lang.String getFor()

      Return the value of the `for` property.

      Contents: Specifies the id of the component to print.

      Specified by:
        `getFor` in interface `IPrinter`

    - #### setIgnoreValidation

          public void setIgnoreValidation(boolean ignoreValidation)

      Set the value of the `ignoreValidation` property.

      Contents: If an ajax behavior is attached to this component, the print interface will appear whether validation failed or not for the ajax request fi this attribute is set to true. Otherwise, the printing action will be halted.

      Specified by:
        `setIgnoreValidation` in interface `IPrinter`

    - #### isIgnoreValidation

          public boolean isIgnoreValidation()

      Return the value of the `ignoreValidation` property.

      Contents: If an ajax behavior is attached to this component, the print interface will appear whether validation failed or not for the ajax request fi this attribute is set to true. Otherwise, the printing action will be halted. Default = 'true'.

      Specified by:
        `isIgnoreValidation` in interface `IPrinter`

    - #### setPassedValidation

          public void setPassedValidation(java.lang.Boolean passedValidation)

      Set the value of the `passedValidation` property.

      Specified by:
        `setPassedValidation` in interface `IPrinter`

    - #### isPassedValidation

          public java.lang.Boolean isPassedValidation()

      Return the value of the `passedValidation` property.

      Specified by:
        `isPassedValidation` in interface `IPrinter`

    - #### isPropertySet

          protected boolean isPropertySet(java.lang.String finder)

    - #### setValueExpression

          public void setValueExpression(java.lang.String name,
                                         javax.el.ValueExpression binding)

      Overrides:
        `setValueExpression` in class `javax.faces.component.UIComponent`

    - #### getEventNames

          public java.util.Collection<java.lang.String> getEventNames()

      Specified by:
        `getEventNames` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getEventNames` in class `javax.faces.component.UIComponentBase`

    - #### getDefaultEventName

          public java.lang.String getDefaultEventName()

      Specified by:
        `getDefaultEventName` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getDefaultEventName` in class `javax.faces.component.UIComponentBase`

    - #### getDefaultRender

          public java.lang.String getDefaultRender(java.lang.String event)

      Specified by:
        `getDefaultRender` in interface `IceClientBehaviorHolder`

    - #### getDefaultExecute

          public java.lang.String getDefaultExecute(java.lang.String event)

      Specified by:
        `getDefaultExecute` in interface `IceClientBehaviorHolder`

    - #### getListenerArgument

          public java.lang.String getListenerArgument(java.lang.String event)

      Specified by:
        `getListenerArgument` in interface `IceClientBehaviorHolder`

    - #### addClientBehavior

          public void addClientBehavior(java.lang.String eventName,
                                        javax.faces.component.behavior.ClientBehavior behavior)

      Specified by:
        `addClientBehavior` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `addClientBehavior` in class `javax.faces.component.UIComponentBase`

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.