Primefaces users guide 3 5

Page 296

PrimeFaces User’s Guide

3.70 OutputPanel OutputPanel is a panel component with the ability to auto update. Info Tag

outputPanel

Component Class

org.primefaces.component.outputpanel.OutputPanel

Component Type

org.primefaces.component.OutputPanel

Component Family

org.primefaces.component

Renderer Type

org.primefaces.component.OutputPanelRenderer

Renderer Class

org.primefaces.component.output.OutputPanelRenderer

Attributes Name

Default

Type

Description

id

null

String

Unique identifier of the component

rendered

TRUE

Boolean

Boolean value to specify the rendering of the component, when set to false component will not be rendered.

binding

null

Object

An el expression that maps to a server side UIComponent instance in a backing bean

style

null

String

Style of the html container element

styleClass

null

String

StyleClass of the html container element

layout

inline

String

Layout of the panel, valid values are inline(span) or block(div).

autoUpdate

FALSE

Boolean

Enables auto update mode if set true.

AjaxRendered Due to the nature of ajax, it is much simpler to update an existing element on page rather than inserting a new element to the dom. When a JSF component is not rendered, no markup is rendered so for components with conditional rendering regular PPR mechanism may not work since the markup to update on page does not exist. OutputPanel is useful in this case. Suppose the rendered condition on bean is false when page if loaded initially and search method on bean sets the condition to be true meaning datatable will be rendered after a page submit. The problem is although partial output is generated, the markup on page cannot be updated since it doesn’t exist. 296


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.