• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

JSF

JSF Composite Components

July 17, 2017 By j2eereference Leave a Comment

Java Server Faces (JSF) uses the facelets and indeed offers the theory of composite components. Composite component is an individual kind of template, which operates as a component in user application. A composite component is comprised of markup tags and various active components. A JSF composite component is reusable and user-generated. It has a personalized, described functionality and it can also contain

(i) validators

(ii) converters

(iii) listeners connected to it like other components.

An XHTML page that has these markup tags and active components can be turned into a composite component.

Functions of the Composite Tags

Provided below is a functional overview of the available composite tags in JSF:

  1. composite:interface tag describes the subject of a composite component. The composite component can be utilized as an individual component whose attribute set is the combination of the attributes declared in the subject.
  2. composite:implementation tag describes the composite component implementation. When a composite:interface emerges, then there must be an equivalent composite:implementation.
  3. composite:attribute tag declares configuration values.attrs tag is used in composite:implementation in order to obtain an attribute described using composite:attribute in composite:interface.
  4. composite:insertChildren tag is used for inserting child elements inside the composite component tag.
  5. composite:valueHolder declares that the composite component reveals the functioning of the ValueHolder, which is appropriate to be used as an objective of connected components in the using page.
  6. composite:editableValueHolder declares that the composite component reveals the functioning of the EditableValueHolder, which is appropriate to be used as an objective of the connected components in the using page.
  7. composite:actionSource declares that the composite component reveals the functioning of the ActionSource which is appropriate to be used as an objective of the connected components in the using page.

In composite:valueHolder , composite:editableValueHolder  and composite:actionSource, the contract of the composite component is declared by the composite:interface , in which these composite components are nested.

Filed Under: JSF

JSF UI Components

July 14, 2017 By j2eereference Leave a Comment

Java Server Faces (JSF) is a framework that makes the development of User Interfaces simpler with the help of UI components in a page. The JSF pattern describes a collection of standard UI components and offers an API for building components. JSF permits the UI components to expand and these JSF UI components are reusable.

Functions of the JSF UI components

JSF allows the developers to build Web applications from a set of UI components, which can deliver themselves in various forms for several client types. Functional overview of these JSF UI components are provided below:

  • h:inputText tag appears as a field and lets user to enter a string. This tag is delivered as html, single-line text input control.
  • h:outputText tag delivers a single line of text output, which appears as a plain text.
  • h:form tag stands for an input form.
  • h:commandButton offers a form to a request. It is delivered as a html <input type=value> element in which the value may be (i) submit, (ii) reset, (iii) image or (iv) push button.
  • h:inputTextarea tag appears as a multi-row field and permits the user to input a multi-line string. It is delivered as html, multi-line text input control.
  • h:commandLink tag is used for linking to a new page or position on a page. It appears as a link and acts like a push button.
  • h:inputSecret tag enables user to enter a string without any need for the real string to appear in the field. It is delivered as html password input control. This tag appears as a field that presents a line of characters.
  • h:inputHidden permits the developer to add a hidden variable in a page. It is delivered as html, hidden element.
  • h:inputFile permits a file to be uploaded and this tag appears as a field with browse button.
  • h:graphicImage tag presents an image.
  • h:dataTable signifies a data wrapping. It is delivered as an attribute rich table control. The table can be revised dynamically.
  • h:message presents the latest or fresh message from a component and it appears as a text string.
  • h:messages presents all the contained messages.
  • h:outputFormat tag presents the output text, but formats only the compound messages.
  • h:outputLabel presents a nested element in the form of a label for a particular input field.
  • h:outputLink is used for linking to a new page or position on a page, excluding the generation of an action event.
  • h:panelGrid provides a table. It is delivered as html <table> element along with (i) <tr> and (ii) <td> components.
  • h:panelGroup assembles a collection of components under a single parent. It is delivered as html <span> or <div> element. It appears as a line in a table.
  • h:selectBooleanCheckbox permits the user to modify the value of a Boolean option.
  • h:selectManyCheckbox presents a collection of check boxes from which a developer can choose numerous values.
  • h:selectManyListbox permits the users to choose numerous objects from a collection of objects, all presented instantaneously. It appears as a multi-select list box.
  • h:selectManyMenu permits the user to choose numerous items from a collection of items. It appears as a menu (multi-select menu).
  • h:selectOneListbox permits the user to choose a single item from a collection of items all presented at once.   It is delivered as html <select> element. It appears as single-select list box.
  • h:selectOneMenu permits the user to choose single item from a collection of items. It appears as a single-select menu.
  • h:selectOneRadio permits the user to choose single item from a collection of items. It is delivered as html <input type=”radio”> element. It appears as a collection of radio buttons.
  • h:column signifies a column of information in a data component. It is delivered as a column of information in the html table.

Filed Under: JSF

What is JavaServer Faces (JSF)?

July 11, 2017 By j2eereference Leave a Comment

JavaServer Faces is nothing but an application framework that is used to create user interfaces that are web based. JavaServer Faces are called as JSF in short. JavaServer Faces can be considered as a combination of the following two frameworks:

  • Struts Framework – Struts is a popular open source framework for web applications that are JSP based
  • Swing Framework – Swing is a famous java user interface framework that is intended to be used in desktop applications

JSF shares common features with Struts and Swing. Similar to Struts framework, JSF offers lifecycle management for web applications using controller servlet.  Also, similar to Swing framework, JSF offers a component model that is rich and complete. This component model encompasses component rendering and event handling.

Competitor of JSF

Besides being considered as a combination of Swing framework and Struts framework, JSF is a direct competitor to Webforms of Microsoft. Both JSF framework and Webforms framework are very similar to one another in concept as well as implementation. Since JSF signifies a standard for Web application frameworks that are Java based, the tool vendors started concentrating on developing IDEs specifically for JSF rather than developing common IDE’s for all existing Web application frameworks (java based), including Struts framework.

Advantages of JavaServer Faces (JSF)

JSF makes the web-based application development much simple, easy and efficient. This is made possible because:

  • JSF allows creation of user interfaces with the help of reusable and standard server side components
  • JSF provides a pile of JSP tags that aids in accessing the server side components
  • JSF saves the state related information transparently and aims at repopulating the forms when they are redisplayed
  • JSF offers a framework using which custom components can be easily implemented
  • With JSF, not just HTML but any markup language can be supported by JSF standard components and custom components
  • JSF encapsulates component rendering and event handling
  • JSF permits vendors to develop Integrated Development Environment (IDE) for a web application framework that is standardized

Filed Under: JSF

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • What is parallel Stream
  • reduce method of the Stream class
  • Difference between the findFirst() and findAny() method
  • intern() method of String class
  • SOLID – Five principles of object-oriented software design
  • Java Coding Best Practices
  • How to use lambda expression effectively
  • Enhanced pseudo-Random Number Generators in java17
  • How to use Foreign-Memory Access API
  • Pattern Matching for instanceof
  • Text Blocks – Feature added in Java17
  • Record – The new feature added in java 17
  • What is Sealed Class
  • Features added in Java 17
  • Java Buzzwords

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.