Skip to main content

Custom Components

  • Chapter
  • First Online:
The Definitive Guide to JSF in Java EE 8
  • 1198 Accesses

Abstract

In Chapter 7 you should have learned that Facelet templates as in <ui:composition>, <ui:include>, and <ui:decorate> are useful when you want to split main page layout fragments into reusable templates, such as header, menu, main content, and footer. And that Facelet tag files such as <t:field> are useful when you want to have a reusable group of components in order to minimize code duplication. And that composite components such as <t:inputLocalTime> are useful when you want to create a custom component with a single responsibility based on existing components and, if necessary, a bunch of HTML.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://javaee.github.io/javaee-spec/javadocs/javax/faces/component/UIData.html#getRowCount-- .

  2. 2.

    https://javaee.github.io/javaee-spec/javadocs/javax/faces/component/UIData.html#setRowIndex-int- .

  3. 3.

    https://javaee.github.io/javaee-spec/javadocs/javax/faces/model/DataModel.html .

  4. 4.

    https://javaee.github.io/javaee-spec/javadocs/javax/faces/component/UIData.html#getValue-- .

  5. 5.

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file .

  6. 6.

    https://javaserverfaces.github.io/docs/2.3/vdldocs/facelets/h/inputFile.html .

  7. 7.

    www.iana.org/assignments/media-types/media-types.xhtml .

  8. 8.

    https://caniuse.com/#feat=input-file-accept .

  9. 9.

    https://github.com/javaee/javaserverfaces-spec/issues/634 .

  10. 10.

    https://javaee.github.io/javaee-spec/javadocs/javax/faces/context/ResponseWriter.html#writeText-java.lang.Object-javax.faces.component.UIComponent-java.lang.String- .

  11. 11.

    https://javaee.github.io/javaee-spec/javadocs/javax/faces/FacesWrapper.html .

  12. 12.

    https://javaee.github.io/javaee-spec/javadocs/javax/faces/application/ResourceDependency.html .

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2018 Bauke Scholtz, Arjan Tijms

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Scholtz, B., Tijms, A. (2018). Custom Components. In: The Definitive Guide to JSF in Java EE 8. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3387-0_11

Download citation

Publish with us

Policies and ethics