JSF composite components

Let’s assume, we use JSF to write an application which offers a simple registration form. This form queries the user for his first name, last name, and email. The page definition might be similar to the one following, but can’t we avoid the repetition of code? Continue reading “JSF composite components”

Interactive Java using Nashorn (part II)

In my last blog [1] I showed you how to invoke Nashorn, how to add a Java class and how to invoke a method on it. Now, we want to perform some queries on a bigger amount of data. You can find a description of this data structure on the free sample pages of my book “Java Lambdas and (parallel) Streams” [2]. You may download the sources of the data generator from source section of the associated web site [3]. Continue reading “Interactive Java using Nashorn (part II)”

JavaLand 2015 & Java aktuell

Last week I visited JavaLand 2015. This great software conference [1] with lot of community activities resides in my home town Brühl [2].

Beside attending lots of tracks I had the opportunity to meet a couple of people face-to-face like Ed Burns (JSF Spec Lead), Geertjan Wielenga (NetBeans product manager), Arun Gupta (Java EE evangelist) and more, especial lot of JUG members from all over Germany. Read an article about my impressions [3].

Most slides are available for download now [4].

And I had the chance, to attend the celebration of 5 years Java aktuell, the Java magazine by the iJUG [5]. Great!

[1] javaland.eu
[2] bruehl.de
[3] heise.de/developer/artikel/developer_artikel_2591380.html
[4] javaland.eu/programm/vortragsunterlagen-zum-download.html
[5] doag.org/index.php?id=1230

Conversation Scope

Our next task is to create a new book entry or to edit an existing one. The book editor shall consist of a tab panel offering one page for the books meta data like title, author, publisher, and one page for each language, where you can edit a review. It must be possible to switch between these pages without loosing data. Not very hard to imagine, that we need a backing bean living longer than just one request. Continue reading “Conversation Scope”

Web Development with Java and JSF: Bean Validation

As stated before, Books is an application, maintained by just one author, who should know about the expected data. Thus, there is no user interface with immediate response after each input or lots of hints. Of course, those features are essential for an application for potentially “unknown” users. Later on, when developing Alumni, we will cover those features in detail. However, a validation is useful to prevent the user from entering data which might not fit the database. Continue reading “Web Development with Java and JSF: Bean Validation”

Source code available

I finished the chapter “Internationalization and Localization” of my book “Web Development with Java and JSF” [1] . Now the book reached about 250 pages.

Source code for the applications as described so far is available from [2]. Developed with the current version of NetBeans and GlassFish.

 

[1] leanpub.com/jsf

[2] webdevelopment-java.info

 

Using Lambda expressions with JSF 2.2

JSF 2.2 comes in conjunction with EL 3.0. This version of the expression language offers a rarely known highlight: It is capable of using lambda expressions and streams. Even thought defined withing the Jave EE 7 spec (and not Java 8), you can still use these cool features! Continue reading “Using Lambda expressions with JSF 2.2”