10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Registering a Custom Component<br />

<strong>The</strong> dataScroller component tag includes a component that will render the header and a<br />

component that will render the Next button. If the renderer associated with this component<br />

renders the facets you can include the following facet elements in the renderer element:<br />

<br />

This facet renders as the<br />

header of the table. It should be a panelGroup<br />

with the same number of columns as the data<br />

<br />

header<br />

header<br />

<br />

<br />

This facet renders as the content<br />

of the "next" button in the scroller. It should be a<br />

panelGroup that includes an outputText tag that<br />

has the text "Next" and a right arrow icon.<br />

<br />

Next<br />

next<br />

<br />

If a component that supports facets provides its own rendering and you want to include facet<br />

elements in the application configuration resource file, you need to put them in the<br />

component’s configuration rather than the renderer’s configuration.<br />

Registering a Custom Component<br />

454<br />

In addition to registering custom renderers (as explained in the preceding section), you also<br />

must register the custom components that are usually associated with the custom renderers.<br />

Here is the component element from the application configuration resource file that registers<br />

AreaComponent:<br />

<br />

DemoArea<br />

<br />

com.sun.bookstore6.components.AreaComponent<br />

<br />

<br />

alt<br />

java.lang.String<br />

<br />

<br />

coords<br />

java.lang.String<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!