Package org.primefaces.renderkit
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,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,WatermarkRenderer,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 -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildAjaxRequest(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>
StringbuildAjaxRequest(javax.faces.context.FacesContext context, T source) protected <T extends javax.faces.component.UIComponent & AjaxSource>
StringbuildAjaxRequest(javax.faces.context.FacesContext context, T source, javax.faces.component.UIForm form) protected StringbuildDomEvent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String domEvent, String behaviorEvent, String behaviorEventAlias, String command) protected StringbuildNonAjaxRequest(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.component.UIComponent form, String decodeParam, boolean submit) protected StringbuildNonAjaxRequest(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 voiddecodeBehaviors(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) protected voidencodeClientBehaviors(javax.faces.context.FacesContext context, javax.faces.component.behavior.ClientBehaviorHolder component) protected voidencodeIndexedId(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 booleanendsWithLenghtUnit(String val) protected StringgetEventBehaviors(javax.faces.context.FacesContext context, javax.faces.component.behavior.ClientBehaviorHolder cbh, String event, List<javax.faces.component.behavior.ClientBehaviorContext.Parameter> parameters) protected Stringprotected StringgetIconOnlyButtonText(String title, String ariaLabel) Gets the ARIA text for an icon only button for screen readers.protected StringgetResourceRequestPath(javax.faces.context.FacesContext context, String resourceName) protected StringgetResourceURL(javax.faces.context.FacesContext context, String value) protected StyleBuildergetStyleBuilder(javax.faces.context.FacesContext context) protected StyleClassBuildergetStyleClassBuilder(javax.faces.context.FacesContext context) protected WidgetBuildergetWidgetBuilder(javax.faces.context.FacesContext context) protected booleanbooleanisValueBlank(String value) protected voidlogDevelopmentWarning(javax.faces.context.FacesContext context, String message) Logs a WARN log message in ProjectStage == DEVELOPMENT.protected AjaxRequestBuilderpreConfiguredAjaxRequestBuilder(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>
AjaxRequestBuilderpreConfiguredAjaxRequestBuilder(javax.faces.context.FacesContext context, T source) protected voidrenderAttribute(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String attribute, Object value) protected voidrenderButtonValue(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 voidrenderChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent child) protected voidrenderChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) protected voidrenderDomEvent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String domEvent, String behaviorEvent, String behaviorEventAlias, String command) protected voidrenderDomEvents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String> eventAttrs) protected voidrenderDummyMarkup(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 voidrenderDynamicPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) protected voidrenderHiddenInput(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 voidrenderOnchange(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) protected voidrenderOnclick(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String command) protected voidrenderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String[] attrs, String[] ignoredAttrs) protected voidrenderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String> attrs) protected final voidrenderPassThruAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, List<String>... attrs) protected voidrenderValidationMetadata(javax.faces.context.FacesContext context, javax.faces.component.EditableValueHolder component) protected booleanshouldRenderAttribute(Object value) protected booleanshouldWriteId(javax.faces.component.UIComponent component) Methods inherited from class javax.faces.render.Renderer
convertClientId, decode, encodeBegin, encodeChildren, encodeEnd, getConvertedValue, getRendersChildren
-
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 void renderChild(javax.faces.context.FacesContext context, javax.faces.component.UIComponent child) throws IOException - Throws:
IOException
-
getResourceURL
-
getResourceRequestPath
-
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 FacesContextid- the id of the hidden fieldvalue- the value of the hidden field, can be NULLdisabled- whether the hidden field is disabled or not- Throws:
IOException- if any error occurs
-
buildDomEvent
-
shouldRenderAttribute
-
isValueBlank
-
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
-
buildNonAjaxRequest
-
buildNonAjaxRequest
-
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
-
shouldWriteId
protected boolean shouldWriteId(javax.faces.component.UIComponent component) -
getWidgetBuilder
-
getStyleClassBuilder
-
getStyleBuilder
-
renderValidationMetadata
protected void renderValidationMetadata(javax.faces.context.FacesContext context, javax.faces.component.EditableValueHolder component) throws IOException - Throws:
IOException
-
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- theFacesContext.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- theFacesContext.component- theUIComponentto render.index- the index number to append to the ID- Throws:
IOException- if any IO error occurs
-
endsWithLenghtUnit
-
getIconOnlyButtonText
Gets the ARIA text for an icon only button for screen readers.- Parameters:
title- the tooltip for the buttonariaLabel- 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 writerescaped- is the button escaped?value- the value for the buttontitle- the title for the buttonarialLabel- the aria label for the button- Throws:
IOException- if any error occurs
-
logDevelopmentWarning
Logs a WARN log message in ProjectStage == DEVELOPMENT.- Parameters:
context- the FacesContextmessage- the message to log
-