The <h:message/> and <h:messages/> can be used for displaying the error, fatal error, warning and information messages for single component and for the whole current view respectively. When it comes to develop a JSF page, it happens for a component/view to have a messages that tell the user about some missing or wrong data must be …
JavaScript – Data Types and Variables
JavaScript Data Types JavaScript provides set of data types to hold data such as String values, Decimal values and Boolean values. The data types depend on the values which are hold by the variable. The JavaScript data types acts as dynamically means same variable can be used as different types. JavaScript contain following three primitive …
JSF 2 Resource Bundle Example
When you implement a web application, it’s good idea to collect message strings in a central location. This process makes it easier to keep messages consistent and, crucially, makes it easier to localize your application for other locales. The messages strings are collected in a file(s) in the properties format, and those files must use …
JSF 2 Form Example
Most of web applications run on a form submission, and JSF 2 applications are not exception. The <h:form/> is the component that’s responsible for allowing the <h:commandButton/> and <h:commandLink/> to submit the view back to the server. The content type that’s used for submission is by default application/x-www-form-urlencoded, once you’ve omitted providing the attribute enctype. Those values that …
JSF 2 PanelGrid and PanelGroup Example
The components <h:panelGrid/> & <h:panelGroup/> are mainly used as an alternative option for laying out the components into a certain form by generating the HTML markup for laying out components in rows and columns. At the other side, <h:panelGrid/> is often used in conjunction with <h:panelGroup/>, which groups two or more components so they are treated as one. …
JavaScript Comparision Operators
Javascript Operators can be categorized as: Comparison operators Conditional Operators Logical Operators All the above three return true/false value. Comparison Operator Comparison operators are also known as relational operators. They are used in conditional statements, especially in loops where result of comparison decides whether execution should proceed. Comparison operators are used to test true or …
JSF 2 Button and Link Example
By default, a JSF application makes a sequence of POST requests to the server each POST contains form data. This makes sense for application that collects user inputs. In the other hand many applications don’t work at this manner. Some other applications provide their users a simple browsing mechanism, in that no data from the …
JSF 2 Body and Head Example
When the web developers try to develop a web application using a JSF 2, no need for using HTML Tags such as <body/> and <head/> for determining the browser body and head respectively. JSF 2 provides both of them as a separate components inside its component kit. The <h:body/> component renders HTML body element, this enables …