Class CoreRenderer

java.lang.Object
javax.faces.render.Renderer
org.primefaces.renderkit.CoreRenderer
Direct Known Subclasses:
AccordionPanelRenderer, AjaxStatusRenderer, AudioRenderer, AvatarGroupRenderer, AvatarRenderer, BadgeRenderer, BarcodeRenderer, BlockUIRenderer, BodyRenderer, CaptchaRenderer, CardRenderer, CarouselRenderer, CellEditorRenderer, ChartRenderer, ChartRenderer, ChipRenderer, ChronolineRenderer, ClockRenderer, ColumnGroupHelperRenderer, ColumnRenderer, ColumnTogglerRenderer, CommandButtonRenderer, CommandLinkRenderer, ConfirmDialogRenderer, ConfirmPopupRenderer, DashboardRenderer, DataRenderer, DataScrollerRenderer, DefaultCommandRenderer, DiagramRenderer, DialogRenderer, DividerRenderer, DraggableRenderer, DroppableRenderer, EffectRenderer, FeedReaderRenderer, FieldsetRenderer, FileUploadRenderer, FocusRenderer, FragmentRenderer, GalleriaRenderer, GMapRenderer, GraphicImageRenderer, HeaderRowRenderer, HotkeyRenderer, IdleMonitorRenderer, ImageCompareRenderer, ImageCropperRenderer, ImageSwitchRenderer, InplaceRenderer, InputRenderer, KeyFilterRenderer, KnobRenderer, LifecycleRenderer, LogRenderer, MediaRenderer, MindmapRenderer, NotificationBarRenderer, OrderListRenderer, OrganigramRenderer, OutcomeTargetRenderer, OutputLabelRenderer, OutputPanelRenderer, OverlayPanelRenderer, PanelGridBodyColumnRenderer, PanelGridBodyRowRenderer, PanelGridFacetColumnRenderer, PanelGridFacetRowRenderer, PanelGridRenderer, PanelRenderer, PhotoCamRenderer, PollRenderer, ProgressBarRenderer, RemoteCommandRenderer, ResizableRenderer, RowEditorRenderer, RowRenderer, RowTogglerRenderer, ScheduleRenderer, ScrollPanelRenderer, ScrollTopRenderer, SeparatorRenderer, SidebarRenderer, SkeletonRenderer, SliderRenderer, SpacerRenderer, SplitterRenderer, SpotlightRenderer, StickyRenderer, SubTableRenderer, SummaryRowRenderer, TabViewRenderer, TagCloudRenderer, TagRenderer, TerminalRenderer, TimelineRenderer, ToolbarRenderer, TooltipRenderer, TreeRenderer, UICacheRenderer, UINotificationRenderer, VideoRenderer, WizardRenderer

public abstract class CoreRenderer extends javax.faces.render.Renderer
  • Field Summary

    Fields inherited from class javax.faces.render.Renderer

    PASSTHROUGH_RENDERER_LOCALNAME_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    buildAjaxRequest(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, AjaxSource source, javax.faces.component.UIForm form, Map<String,List<String>> params)
     
    protected <T extends javax.faces.component.UIComponent & AjaxSource>
    String
    buildAjaxRequest(javax.faces.context.FacesContext context, T source)
     
    protected <T extends javax.faces.component.UIComponent & AjaxSource>
    String
    buildAjaxRequest(javax.faces.context.FacesContext context, T source, javax.faces.component.UIForm form)
     
    protected String
    buildDomEvent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String domEvent, String behaviorEvent, String behaviorEventAlias, String command)
     
    protected String
    buildNonAjaxRequest(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.component.UIComponent form, String decodeParam, boolean submit)
     
    protected String
    buildNonAjaxRequest(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.component.UIComponent form, String decodeParam, Map<String,List<String>> parameters, boolean submit)
     
    protected void
    decodeBehaviors(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
     
    protected void
    encodeClientBehaviors(javax.faces.context.FacesContext context, javax.faces.component.behavior.ClientBehaviorHolder component)
     
    protected void
    encodeIndexedId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, int index)
    GitHub #7763 Renders an in memory UIComponent and updates its ID with an index.
    protected boolean
     
    protected String
    getEventBehaviors(javax.faces.context.FacesContext context, javax.faces.component.behavior.ClientBehaviorHolder cbh, String event, List<javax.faces.component.behavior.ClientBehaviorContext.Parameter> parameters)
     
    protected String
     
    protected String
    getIconOnlyButtonText(String title, String ariaLabel)
    Gets the ARIA text for an icon only button for screen readers.
    protected String
    getResourceRequestPath(javax.faces.context.FacesContext context, String resourceName)
     
    protected String
    getResourceURL(javax.faces.context.FacesContext context, String value)
     
    protected StyleBuilder
    getStyleBuilder(javax.faces.context.FacesContext context)
     
    getStyleClassBuilder(javax.faces.context.FacesContext context)
     
    protected WidgetBuilder
    getWidgetBuilder(javax.faces.context.FacesContext context)
     
    protected boolean
     
    boolean
     
    protected void
    logDevelopmentWarning(javax.faces.context.FacesContext context, String message)
    Logs a WARN log message in ProjectStage == DEVELOPMENT.
    preConfiguredAjaxRequestBuilder(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, AjaxSource source, javax.faces.component.UIForm form)
     
    protected <T extends javax.faces.component.UIComponent & AjaxSource>
    AjaxRequestBuilder
    preConfiguredAjaxRequestBuilder(javax.faces.context.FacesContext context, T source)
     
    protected void
    renderAttribute(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String attribute, Object value)
     
    protected void
    renderButtonValue(javax.faces.context.ResponseWriter writer, boolean escaped, Object value, String title, String arialLabel)
    Renders a button value or label for screen readers if no value is present or icon only button.
    protected javax.faces.component.UIComponent
    renderChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent child)
     
    protected void
    renderChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
     
    protected void
    renderDomEvent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String domEvent, String behaviorEvent, String behaviorEventAlias, String command)
     
    protected void
    renderDomEvents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String> eventAttrs)
     
    protected void
    renderDummyMarkup(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String clientId)
    Used by script-only widget to fix #3265 and allow updating of the component.
    protected void
    renderDynamicPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
     
    protected void
    renderHiddenInput(javax.faces.context.FacesContext context, String id, String value, boolean disabled)
    Renders a hidden input field commonly use for holding state for a component.
    protected void
    renderOnchange(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
     
    protected void
    renderOnclick(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String command)
     
    protected void
    renderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String[] attrs, String[] ignoredAttrs)
     
    protected void
    renderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String> attrs)
     
    protected final void
    renderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String>... attrs)
     
    <T extends javax.faces.component.UIComponent & RTLAware>
    void
    renderRTLDirection(javax.faces.context.FacesContext context, T component)
     
    protected void
    renderValidationMetadata(javax.faces.context.FacesContext context, javax.faces.component.EditableValueHolder component, ClientValidator... clientValidators)
     
    protected boolean
     
    protected boolean
    shouldWriteId(javax.faces.component.UIComponent component)
     

    Methods inherited from class javax.faces.render.Renderer

    convertClientId, decode, encodeBegin, encodeChildren, encodeEnd, getConvertedValue, getRendersChildren

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CoreRenderer

      public CoreRenderer()
  • Method Details

    • renderChildren

      protected void renderChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
      Throws:
      IOException
    • renderChild

      protected javax.faces.component.UIComponent renderChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent child) throws IOException
      Throws:
      IOException
    • getResourceURL

      protected String getResourceURL(javax.faces.context.FacesContext context, String value)
    • getResourceRequestPath

      protected String getResourceRequestPath(javax.faces.context.FacesContext context, String resourceName)
    • renderPassThruAttributes

      protected void renderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String> attrs) throws IOException
      Throws:
      IOException
    • renderPassThruAttributes

      @SafeVarargs protected final void renderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String>... attrs) throws IOException
      Throws:
      IOException
    • renderDynamicPassThruAttributes

      protected void renderDynamicPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
      Throws:
      IOException
    • renderDomEvents

      protected void renderDomEvents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String> eventAttrs) throws IOException
      Throws:
      IOException
    • renderPassThruAttributes

      protected void renderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String[] attrs, String[] ignoredAttrs) throws IOException
      Throws:
      IOException
    • renderAttribute

      protected void renderAttribute(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String attribute, Object value) throws IOException
      Throws:
      IOException
    • renderOnchange

      protected void renderOnchange(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
      Throws:
      IOException
    • renderOnclick

      protected void renderOnclick(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String command) throws IOException
      Throws:
      IOException
    • renderDomEvent

      protected void renderDomEvent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String domEvent, String behaviorEvent, String behaviorEventAlias, String command) throws IOException
      Throws:
      IOException
    • renderHiddenInput

      protected void renderHiddenInput(javax.faces.context.FacesContext context, String id, String value, boolean disabled) throws IOException
      Renders a hidden input field commonly use for holding state for a component. Properly handles all attributes and renders as autocomplete="off" so browsers don't hold onto state between page refreshes.
      Parameters:
      context - the FacesContext
      id - the id of the hidden field
      value - the value of the hidden field, can be NULL
      disabled - whether the hidden field is disabled or not
      Throws:
      IOException - if any error occurs
    • renderRTLDirection

      public <T extends javax.faces.component.UIComponent & RTLAware> void renderRTLDirection(javax.faces.context.FacesContext context, T component) throws IOException
      Throws:
      IOException
    • buildDomEvent

      protected String buildDomEvent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String domEvent, String behaviorEvent, String behaviorEventAlias, String command)
    • shouldRenderAttribute

      protected boolean shouldRenderAttribute(Object value)
    • isValueBlank

      public boolean isValueBlank(String value)
    • preConfiguredAjaxRequestBuilder

      protected <T extends javax.faces.component.UIComponent & AjaxSource> AjaxRequestBuilder preConfiguredAjaxRequestBuilder(javax.faces.context.FacesContext context, T source)
    • preConfiguredAjaxRequestBuilder

      protected AjaxRequestBuilder preConfiguredAjaxRequestBuilder(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, AjaxSource source, javax.faces.component.UIForm form)
    • buildAjaxRequest

      protected <T extends javax.faces.component.UIComponent & AjaxSource> String buildAjaxRequest(javax.faces.context.FacesContext context, T source)
    • buildAjaxRequest

      protected <T extends javax.faces.component.UIComponent & AjaxSource> String buildAjaxRequest(javax.faces.context.FacesContext context, T source, javax.faces.component.UIForm form)
    • buildAjaxRequest

      protected String buildAjaxRequest(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, AjaxSource source, javax.faces.component.UIForm form, Map<String,List<String>> params)
    • buildNonAjaxRequest

      protected String buildNonAjaxRequest(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.component.UIComponent form, String decodeParam, boolean submit)
    • buildNonAjaxRequest

      protected String buildNonAjaxRequest(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.component.UIComponent form, String decodeParam, Map<String,List<String>> parameters, boolean submit)
    • encodeClientBehaviors

      protected void encodeClientBehaviors(javax.faces.context.FacesContext context, javax.faces.component.behavior.ClientBehaviorHolder component) throws IOException
      Throws:
      IOException
    • decodeBehaviors

      protected void decodeBehaviors(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
    • getEventBehaviors

      protected String getEventBehaviors(javax.faces.context.FacesContext context, javax.faces.component.behavior.ClientBehaviorHolder cbh, String event, List<javax.faces.component.behavior.ClientBehaviorContext.Parameter> parameters)
    • shouldWriteId

      protected boolean shouldWriteId(javax.faces.component.UIComponent component)
    • getWidgetBuilder

      protected WidgetBuilder getWidgetBuilder(javax.faces.context.FacesContext context)
    • getStyleClassBuilder

      protected StyleClassBuilder getStyleClassBuilder(javax.faces.context.FacesContext context)
    • getStyleBuilder

      protected StyleBuilder getStyleBuilder(javax.faces.context.FacesContext context)
    • renderValidationMetadata

      protected void renderValidationMetadata(javax.faces.context.FacesContext context, javax.faces.component.EditableValueHolder component, ClientValidator... clientValidators) throws IOException
      Throws:
      IOException
    • getHighlighter

      protected String getHighlighter()
    • isGrouped

      protected boolean isGrouped()
    • renderDummyMarkup

      protected void renderDummyMarkup(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String clientId) throws IOException
      Used by script-only widget to fix #3265 and allow updating of the component.
      Parameters:
      context - the FacesContext.
      component - the widget without actual HTML markup.
      clientId - the component clientId.
      Throws:
      IOException
    • encodeIndexedId

      protected void encodeIndexedId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, int index) throws IOException
      GitHub #7763 Renders an in memory UIComponent and updates its ID with an index. For example id="form:test" becomes id="form:test:0".
      Parameters:
      context - the FacesContext.
      component - the UIComponent to render.
      index - the index number to append to the ID
      Throws:
      IOException - if any IO error occurs
    • endsWithLenghtUnit

      protected boolean endsWithLenghtUnit(String val)
    • getIconOnlyButtonText

      protected String getIconOnlyButtonText(String title, String ariaLabel)
      Gets the ARIA text for an icon only button for screen readers.
      Parameters:
      title - the tooltip for the button
      ariaLabel - the ARIA label for the button
      Returns:
      either title, or ARIA label, or fallback "ui-button"
    • renderButtonValue

      protected void renderButtonValue(javax.faces.context.ResponseWriter writer, boolean escaped, Object value, String title, String arialLabel) throws IOException
      Renders a button value or label for screen readers if no value is present or icon only button.
      Parameters:
      writer - The response writer
      escaped - is the button escaped?
      value - the value for the button
      title - the title for the button
      arialLabel - the aria label for the button
      Throws:
      IOException - if any error occurs
    • logDevelopmentWarning

      protected void logDevelopmentWarning(javax.faces.context.FacesContext context, String message)
      Logs a WARN log message in ProjectStage == DEVELOPMENT.
      Parameters:
      context - the FacesContext
      message - the message to log