Name
<h:panelGroup>
Synopsis
This action represents an instance of the
component
type registered with the type ID
javax.faces.HtmlPanelGroup
(by default, an
instance of the
javax.faces.component.html.HtmlPanelGroup
class),
combined with a renderer registered with the renderer type ID
javax.faces.Group
.
The component acts as a container for other components in situations
where only one component is allowed, e.g., when a group of components
is used as a facet. It renders its children, within an HTML
<span>
element if any of the HTML attributes
or the id
attribute is set.
Syntax
<h:panelGroup [id="id
"] [binding="componentBinding
"] [rendered="true
|false"] <!-- HTML attributes --> [style="style
"] [styleClass="styleClass
"] >JSF component action elements
</h:panelGroup>
Attributes
Attribute name |
Java type |
EL expression type |
Description |
binding |
String |
VB |
Must be a value binding expression for a property the component is bound to. |
id |
String |
None |
The component ID. |
rendered |
boolean |
Any |
If set to |
Example
<h:form> <h:panelGrid columns="2"> <f:facet name="header"> <h:panelGroup> <h:outputText value="Sales stats for " /> </h:outputText value="#{sales.region}" style="font-weight: bold" /> </h:panelGroup> </f:facet> <h:outputText value="January" /> <h:inputText value="#{sales.jan}" /> <h:outputText value="February" /> <h:inputText value="#{sales.feb}" /> ... </h:panelGrid> </h:form>
Get JavaServer Faces now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.