Search

4.4.3. Example

download PDF
The following is an example of a simple panel component:
<rich:panel> ... </rich:panel>
This code generates a panel component on a page, which consists of two elements: a wrapper <div> element and a <div> element for the panel body with the specified style properties. The wrapper <div> element will look like this:
<div class="dr-pnl rich-panel">
     ...
</div>
dr-pnl is a CSS class that is specified in the framework via skin parameters:
  • background-color is defined with generalBackgroundColor
  • border-color is defined with panelBorderColor
You can change all colors for all panels on all pages by changing these skin parameter values. However, if you specify a <rich:panel> class on the page, its parameters are also acquired by all panels on this page.
Developers can also change the style properties for panel. For example:
<rich:panel styleClass="customClass" />
The previous definition could add some style properties from customClass to one particular panel. As a result, we will get three styles:
<div class="dr_pnl rich-panel customClass"> 
	...
</div>
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.