A JSF Handler part, also called a JSF Handler, is a logic part that is customized to control a web page at run time. In prior versions of EGL, JSF Handlers were PageHandler parts and referred to generally as page handlers.
Like other types of logic part, JSF Handler parts can contain any number of user-defined functions. You might use functions in a JSF Handler to validate or change the data that a user types into a web page, to assign values to fields in a web page, to respond to a user's actions on the page, or to forward the user or data to a different page. However, it is best to keep JSF Handlers as simple as possible and to use libraries or services for complicated business logic, because functions in a JSFHandler part behave as though they are private and are not available to other EGL logic parts or other JSF Handlers.
JSF Handler parts also contain specialized functions that run automatically at certain points in the life of a web page. For more information, see Executing commands when a page loads.
You can also make variables and functions that are defined in the JSF Handler available to the web page. In this case, you bind the variable to an input or output component on the page, or bind the function to a command button. When a variable is bound to a component on the page and the user changes the value in the component, the value of the variable changes to match, and if the logic in the JSF Handler changes the value of the variable, the value on the page changes to match. Likewise, if a user clicks a button bound to a function in the JSF Handler, that function is called.
Generally, there is a one-to-one relationship between JSF Handlers and web pages.
See JSF Handler part for more information about JSF Handler parts.
The Java™ Server Pages (JSP) files in an EGL web project are the files that most resemble the web pages that a user will actually see in the browser. In web terms, these files create the view portion of a web application. JSP files contain all the text, tables, and other elements that are commonly seen on web pages, plus dynamic areas that can change at run time based on the logic in the JSF Handler. For these dynamic areas, EGL web applications use JavaServer Faces (JSF), a technology that includes reusable user interface components, such as command buttons, links, input fields, and output fields. In EGL web applications, you add JSF components to your JSP files and refer to those JSF components in your JSF Handler code.
For more information on JSP files, see JavaServer Pages (JSP) technology. For more information on JSF technology, see JavaServer Faces (JSF) overview.
The JavaServer Faces (JSF) configuration file contains information for your pages and for the JSF components on those pages. In general you will not need to edit the JSF configuration file yourself, but you should be aware of the information stored in the file and how it affects your EGL pages. For example, the JSF configuration file contains navigation rules, or navigation aliases for your pages. EGL uses these aliases with the forward statement to allow your JSF Handlers to forward the user from one page to another. See Navigating among web pages with navigation rules.
By default, the JSF configuration file is named faces-config.xml and is located in the WebContent/WEB_INF folder.
The web deployment descriptor, not to be confused with the EGL deployment descriptor, provides deployment information
For more information on the web deployment descriptor, see Configuring web applications using the web deployment descriptor editor.
By default, all web projects in the workbench, including EGL web projects, contain a Website Navigation file. This file is labeled Website Navigation in the Project Explorer view and named .website-config in the Navigator view. The Website Navigation file allows you to plan your web application with a map of the pages and the relationships between them. For more information, see Designing Websites.For more information, see "Designing Websites" in the online help.
By default, all web projects in the workbench, including EGL web projects, contain a web diagram. EGL does not support web diagrams. Use the Website Navigation file instead. For information on working with web diagrams, see Web diagrams and the web diagram editor.
Like other web projects, an EGL web application can contain files that are used to control the runtime appearance and behavior of web pages, including images, Cascading Style Sheet (CSS) files, and JavaScript files. For more information about using style sheet files, see Defining styles. For more information about using JavaScript, see Adding code to web pages.