Home » Enterprise Java » jsf » Page 4

jsf

JSF Internationalization Example

So, you want your web app to be famous all-over the world?! Then you obviously have to support multiple languages, something also known as i18n or internationalization in the software industry. Today’s example is a simple yet interesting guide according to JSF internationalization. Specifically, our sample application will be able to translate a message between English and Greek (there will ...

Read More »

JSF Standard Validators Example

Hey geeks, today we ‘re gonna talk about JSF Standard Validators. Just like any other framework, JSF is here to help us save time from common development tasks, such as form validations. We can obviously write our own, custom validators for our site’s forms, but there are some standard validators provided from JSF that handle checks for string lengths and ...

Read More »

JSF Resource Bundles Example

In this example we will show you how to use resource bundles in Java Server Faces. Resource bundles in JSF are key value pair of strings stored in .properties file extension. Resource bundles helps in maintainability of the application by keeping messages at one place. We will discuss about different methods available to load the resource bundle and show you how to ...

Read More »

JSF Navigation Example

In this example of JSF Navigation, we will show you how to use various navigation techniques available in Java Server Faces. A set of rules for choosing the next page based on a action, for example a click of button are called navigation rules. In Java Server Faces technology, navigation consists of one or more navigation rules for an application. We ...

Read More »

JSF Managed Beans Example

In this example we will talk about the basics of the JSF Standard and the Managed Bean concept. With these tools we can develop and support an application’s clear architecture, and get an easily integration with java EE modern technologies. Then, we learn how to work with the backend, using JSF Managed Beans.               ...

Read More »

Param and Attribute Example with JSF 2.0

Today we ‘re gonna talk about parameter manipulation in JSF, using param and attribute tags. 1. Param Tag What about parameters in JSF? In JSF, we can use the <f:param> tag, in order to pass a parameter to a component (or pass request parameters), but things here, are not so clear, as it’s behavior depends on the component that it ...

Read More »

Message and Messages Example with JSF 2.0

Hi there, today we ‘ll see how to display special messages (i.e. for validation purpose) in JSF. In JSF, we can use the following two tags to render a message: <h:message> : displays a single message for a specific component. <h:messages> : displays all messages in the current page. Here is a good example, demonstrating a page with form validation, ...

Read More »

PanelGrid Example with JSF 2.0

Today we ‘re gonna talk about table formatting in JSF. Remember yourself on your very first steps to Web Development, how easy was it to manipulate a table with raw HTML? You had to follow a strict writing with a bunch of specific HTML tags, in order to get what you wanted to. JSF is here to make our lives ...

Read More »

Link, CommandLink, OutputLink Example with JSF 2.0

Hi there! Continuing on the same pace as in my last example, today we ‘ll see several easy mini examples according to link features. In JSF 2.0, we can use <h:link />, <h:commandLink /> and <h:commandLink /> tags to render an HTML anchor element. To begin with, let’s assume that we already have our project root set, under /LinkExamplesJSF/.   ...

Read More »

Button and CommandButton Example with JSF 2.0

Hello Java code geeks! Today we ‘re gonna take a look at navigation handling, using buttons. Regarding JSF 2.0, both <h:button /> and <h:commandButton /> are used to render HTML input element mechanisms that can guide the navigation through a web application.                   1. h:commandButton tag We first have to declare the ...

Read More »