Home » Enterprise Java » jsf » Page 5

jsf

OutputScript Example with JSF 2.0

Hi there, today we ‘ll see how to include a javascript file in our JSF applications. In JSF 2.0, we can use the <h:outputScript /> tag to render an HTML script element and link it to a javascript file.                       For example, <h:outputScript library="js" name="common.js" /> will generate an HTML ...

Read More »

OutputStyleSheet Example with JSF 2.0

Hello geeks, another quick ‘n easy example for today! In our last JSF example, we figured out how to manipulate an image insertion into a JSF application. Ok, we now know how to implement this, but without CSS, it’s just another brick in our JSF wall. So, how could we include a css file into a JSF project? That’s what ...

Read More »

GraphicImage Example with JSF 2.0

Hi there, pretty short time since my last example! This one is gonna be too short, ’cause you ‘re now enough experienced to get the best out of it. Assuming that we ‘re building an awesome web application and we want to include an image or more in it, here comes the question: how could we get this done?   ...

Read More »

OutputFormat Example with JSF 2.0

Hi there, have a nice and proactive week! Today we ‘ll extend a little bit our last example, just to make sure that we do make clear the difference between <h:outputText /> and <h:outputFormat />. Generally, the fore-mentioned JSF tags are similar, but the one that we ‘re going to talk today about, provides some extra functionality that enables a ...

Read More »

OutputText Example with JSF 2.0

Hi there, pretty short time since my last example! I’ ll firstly try to give a short explanation about the connection of my last example with this. So, let’s give it a try! The reason that we ‘re now won’t have a full example of multiple selectable dropdown list, as we used to in the last few examples, is that ...

Read More »

Dropdown List (selectOneMenu) Example with JSF 2.0

Hi there, it’s been a long time since my last example, but there isn’t any time at all, after work. So, let’s get back to business. Remembering myself explaining quite interesting stuff in an easy way, in the last few examples, we ‘ll continue on the same basis, but this time, we ‘ll get our hands dirty with dropdown lists! ...

Read More »

Multiple Selection ListBox Example with JSF 2.0

Hello again World, it’s been a long time since my last example, so let’s get back to work! If you can’t remember, in our last example, we were talking about listboes integration with JSF 2.0. Ok, but what happens if user has to select more than one single option from a listbox? That is, that’s the purpose of this example. ...

Read More »

ListBox Example with JSF 2.0

Hello Java Developers, today we ‘re gonna talk about listboxes in JSF 2.0. In JSF, we can use the <h:selectOneListbox /> tag, in order to render a single-selection listbox. For example, a simple HTML listbox that includes three options, could be displayed using JSF, like below:                     <h:selectOneListbox value="#{user.favoriteYear}"> <f:selectItem itemValue="2000" ...

Read More »

CheckBox Example with JSF 2.0

Hi there, hope you had an interesting day. Today we ‘re gonna talk about checkboxes in JSF 2.0. To represent a checkbox in JSF, we use the tag h:selectBooleanCheckbox. Ok, that’s really easy, but what if we ‘d like to create a group of checkboxes, where the user could select more than one checkbox? This can be done using the ...

Read More »

Radio Buttons Example with JSF 2.0

So today, we ‘re gonna talk about radiobuttons’ integration together with JSF 2.0 and Eclipse IDE. In JSF, we can use the h:selectOneRadio tag, in order to create a radiobutton like input element.                     For example, assume the following JSF code: <h:selectOneRadio value="#{user.favoriteBMW}"> <f:selectItem itemValue="335" itemLabel="BMW 335" /> <f:selectItem itemValue="316" itemLabel=" ...

Read More »