tag:blogger.com,1999:blog-53965706337712292672024-03-18T04:03:44.716+01:00The BalusC CodeCode depot of a Jakarta EE developerBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.comBlogger130125tag:blogger.com,1999:blog-5396570633771229267.post-55340663128775937553000-01-01T07:01:00.026+01:002023-11-23T12:44:20.768+01:00WelcomeLooking for the latest JSF tutorial?
Here it is: JSF 2.3 tutorial with Eclipse, Maven, WildFly and H2
The Faces 4.0 variant of that tutorial is currently only available in the book The Definitive Guide for Jakarta Faces in Jakarta EE 10.
Looking for what's new in Faces 4.0?
Here it is: What's new in Faces 4.0?
Looking for the latest five articles?
Here they are:
November 23, 2023:
BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com40tag:blogger.com,1999:blog-5396570633771229267.post-17765074999183674362023-11-23T14:43:00.014+01:002024-02-14T15:40:53.442+01:00Using OmniFaces CDI @ViewScoped with unload/destroy in a Spring Boot projectIntroduction
While working on a Spring Boot based Faces project having memory issues, one of the solutions is to migrate the existing @Scope("view") beans and/or @SessionScope beans disguised as view scoped beans to use OmniFaces @ViewScoped instead, so that they get destroyed immediately when the webpage unloads and hereby also immediately frees up memory occuppied by the managed bean state as BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-25823196980376631712023-09-23T17:40:00.001+02:002023-09-23T17:40:46.558+02:00OmniFaces 4.3 / 3.14.4 / 2.7.24 released!OmniFaces 4.3 has been released!
A couple of new things were introduced:
<o:importConstants> and <o:importFunctions> got a new loader attribute where you can specify an object whose class loader will be used to load the class specified in the type attribute. In the end this should allow you to use a more specific class when there are duplicate instances in the runtime classpath, BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-27842480275152896232023-06-24T21:06:00.001+02:002023-06-24T21:06:20.374+02:00OmniFaces 4.2 / 3.14.3 / 2.7.23 released!OmniFaces 4.2 has been released!
The PWAResourceHandler can now also be triggered via manifest.webmanifest instead of manifest.json. The manifest.webmanifest will eventually become the default resource name as per latest W3C draft on this.
The Components utility class got a bunch of new methods:
getRenderedValue(ValueHolder valueHolder) so that you can easily grab the to-be-rendered value ofBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-9899318592912616502023-02-26T23:00:00.091+01:002023-02-27T12:58:37.735+01:00OmniFaces 4.1 / 3.14.2 / 2.7.22 now availableOmniFaces 4.1 has been released!
Nothing shocking. Just one new tag attribute and a bunch of improvements/fixes as compared to 4.0. As usual all these improvements/fixes have been backported into 3.14.2 / 2.7.22.
You can find the complete list of additions, changes and fixes at What's new in OmniFaces 4.1? list in showcase.
Readonly hidden input
The new tag attribute is the <o:inputHidden BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-74021420456636353682022-10-02T23:32:00.026+02:002022-11-16T18:20:54.857+01:00OmniFaces 4.0 has been released!OmniFaces 4.0 has been released!
Finally, as a response to the Jakarta EE 10 release on 22 September 2022, OmniFaces 4.0 is now final after a long serie of milestones!
It's basically the Jakartified version of 3.14 with a few breaking changes. OmniFaces 4.0 is compatible with Faces 4.0 from Jakarta EE 10 as well as Faces 3.0 from Jakarta EE 9.1. OmniFaces 4.0 requires a minimum of Java 11.
BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-36814224692882094932022-01-22T21:23:00.001+01:002022-01-22T21:25:25.042+01:00OmniFaces 3.13 has been released!OmniFaces 3.13 has been released!
Nothing shocking. Just one new utility method, two small API changes and a bunch of improvements/fixes as compared to 3.12. One of the small API changes is related to the CombinedResourceHandler and the <o:deferredScript>: they will now by default automatically render an integrity attribute with the proper SHA-384 hash as SRI (Subresource Integrity) whenBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-50430149289978246322021-11-29T18:07:00.171+01:002024-01-30T16:37:43.484+01:00What's new in Faces 4.0?Introduction
At 22 september 2022, Faces 4.0 has been released as part of Jakarta EE 10!
History
First a little bit of history as a refresher:
31 Aug 2017: Java EE 8 was released by Oracle. This included JSF 2.3, then still named "JavaServer Faces". All changes could be found in the What's new in JSF 2.3? blogpost of Arjan Tijms, then also a committer of Mojarra, but now a project lead BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com10tag:blogger.com,1999:blog-5396570633771229267.post-41079247412985249742021-11-15T11:19:00.010+01:002021-12-03T03:41:19.877+01:00OmniFaces 3.12 released!OmniFaces 3.12 has been released!
Nothing shocking. Just one new tag attribute and a bunch of improvements/fixes as compared to 3.11.
You can find the complete list of additions, changes and fixes at What's new in OmniFaces 3.12? list in showcase.
Installation
Non-Maven users: download OmniFaces 3.12 JAR and drop it in /WEB-INF/lib the usual way, replacing the older version if any.
Maven BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-68397816983243617502021-04-04T20:45:00.001+02:002021-04-04T20:45:36.720+02:00OmniFaces 3.11 released!OmniFaces 3.11 has been released!
Nothing shocking. Just one new utility method and a small handful improvements/fixes. It's been more than 2 months since previous release, so it's about time for a new release even if it's relatively minor.
You can find the complete list of additions, changes and fixes at What's new in OmniFaces 3.11? list in showcase.
Installation
Non-Maven users: download BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com1tag:blogger.com,1999:blog-5396570633771229267.post-42837664231112527012021-01-24T18:54:00.011+01:002021-04-04T20:43:29.423+02:00OmniFaces 3.10 released!OmniFaces 3.10 has been released!
It introduces among others the new ViewResourceHandler which enables using JSF components and EL expressions in non-Facelets files, such as /sitemap.xml and /robots.txt, a new <o:sitemapUrl> component, and a new lazy="true" attribute for the <o:graphicImage.
You can find the complete list of additions, changes and fixes at What's new in OmniFaces 3.10?BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-28560681437672965592020-12-19T16:19:00.003+01:002021-04-04T20:43:39.982+02:00OmniFaces 3.9 released with new exception handlers and resource handlerOmniFaces 3.9 has been released!
In this version, among others two new exception handlers have been added: the ExceptionSuppressor and ViewExpiredExceptionHandler, as well as a new resource handler: the VersionedResourceHandler. All based on contributions of Lenny Primak.
You can find the complete list of additions, changes and fixes at What's new in OmniFaces 3.9? list in showcase.
BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-20023130543485210292020-11-13T15:45:00.040+01:002020-11-14T01:22:28.898+01:00Using Java 14 Records in JSF via EclipseIntroduction
Java 14 introduced the record type. It's basically some sort of an immutable JavaBean without the need to write/generate all these accessor/equals/hashCode/toString methods.
Summarized, the following record in its full form:
public record Person(
Long id,
String email,
LocalDate dateOfBirth
) {}
Corresponds less or more to the following class:
public class Person {
BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com2tag:blogger.com,1999:blog-5396570633771229267.post-44870857211769229212020-09-12T14:07:00.007+02:002021-04-04T20:44:00.059+02:00OmniFaces 3.8 o:validateBean improvements and a handful new utilitiesOmniFaces 3.8 has been released!
In this version, the <o:validateBean> has been improved to support validating nested properties annotated with @Valid. Previously it only supported validating bean's own properties. Further a handful of new utilities have been added: Beans#isProxy(Object), Beans#unwrapIfNecessary(Object), Components#getExpectedType(ValueExpression), Components#BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-3566859451365220682020-07-18T20:46:00.001+02:002020-07-25T14:39:47.213+02:00OmniFaces 4.0-M1 ready for testing!This is the first milestone release of OmniFaces 4.0, which is the first version developed specifically for JSF 3.0 from Jakarta EE 9 which is currently scheduled to be released at September 2020! OmniFaces 4.x is NOT backwards compatible with earlier Java EE / JSF versions because of the migration of the javax.* package to jakarta.* package.
Noted should be that Jakarta EE 9 initially went for BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-74344813326697603562020-07-13T01:04:00.004+02:002020-12-19T16:11:20.736+01:00OmniFaces 3.7 adds autogenerated sw.js, o:inputHidden and of:stripTags()OmniFaces 3.7 has been released!
In this version, the WebAppManifestResourceHandler got a new feature: auto-generating an offline-aware service worker file sw.js based on welcome files in web.xml and the configuration in your custom WebAppManifest implementation. With this new feature, the resource handler was renamed to PWAResourceHandler. Further a new component <o:inputHidden> componentBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-16660232507221364702020-05-03T18:24:00.001+02:002020-07-12T18:17:32.845+02:00OmniFaces 3.6 adds manifest.json generator, o:scriptParam, and o:pathParamOmniFaces 3.6 has been released!
Next to a bunch of utility methods, this version adds a WebAppManifestResourceHandler which autogenerates the manifest.json based on properties of a CDI bean, the <o:scriptParam> which allows you to set evaluated JavaScript results in a managed bean, and a <o:pathParam> which can be used in UIOutcomeTarget components (such as <h:link>) to BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-43660954033898848732020-04-18T23:36:00.013+02:002024-01-23T12:27:46.177+01:00JSF 2.3 tutorial with Eclipse, Maven, WildFly and H2
Fast menu
Introduction
Installing Java SE JDK
What About Jakarta EE?
Installing WildFly
Installing Eclipse
Configuring Eclipse
Integrating New Server in Eclipse
Creating New Project in Eclipse
Adjusting Deployment Descriptors
Creating the Backing Bean Class
Creating the Facelets File
Deploying the Project
Installing H2
Configuring DataSource
Configuring JPA
BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com31tag:blogger.com,1999:blog-5396570633771229267.post-20039439649463628592020-04-12T17:29:00.000+02:002020-07-18T16:26:03.352+02:00OmniFaces 3.5 has been released!OmniFaces 3.5 has been released!
A handful utility functions/methods have been added:
#{of:encodeURI()} EL function so that you can URI-encode parts of URLs outside the query string. There was indeed already an #{of:encodeURL()}, but this is only useful to encode query string parameter names and values. This was not useful to encode the domain or path.Usage example:<a href="//example.com/#{BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-41689509416829404552019-10-27T18:27:00.003+01:002020-07-18T16:25:40.821+02:00OmniFaces 3.4 has been released :)OmniFaces 3.4 has been released :)
Also in this version, not really a lot of new things. Only a new onerror attribute for <o:socket>. It will be invoked on every failed attempt to connect to the server until it gives up and invokes the existing onclose attribute. It's thus more useful than onclose in case you want to take an immediate action when the websocket couldn't connect the server BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-86993995674163870462019-05-05T18:22:00.001+02:002020-07-18T20:22:07.810+02:00OmniFaces 3.3 (finally) released!OmniFaces 3.3 has been released!
After a little more than 9 months after 3.2 release, the 3.3 has finally been released. I waited a bit too long because there were not really exciting new things being added since 3.2 release. In total, there are only 2 minor additions, 2 minor changes and 7 bugfixes. But it has to be released anyway. So here it is :) One of the causes of the little work is that BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-66481665267754300162018-07-29T22:00:00.000+02:002020-07-18T20:22:11.830+02:00OmniFaces 3.2 adds o:hashParam, CDNResource and UUID in exception loggingOmniFaces 3.2 has been released!
Next to a bunch of utility methods, this version adds a <o:hashParam> and a CDNResource, and the FullAjaxExceptionhandler and FacesExceptionFilter will from now log the exceptions with an UUID and user IP.
You can find the complete list of additions, changes and fixes at What's new in OmniFaces 3.2? list in showcase.
Installation
Non-Maven users: BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-7962003239174821792018-04-12T22:00:00.000+02:002020-07-18T20:22:40.185+02:00OmniFaces 3.1 adds MessagesKeywordResolver and SourceMapResourceHandlerOmniFaces 3.1 has been released!
Next to a bunch of utility methods, this version adds a MessagesKeywordResolver and a SourceMapResourceHandler. This version also deprecates WebXml.INSTANCE and FacesConfigXml.INSTANCE with as replacement the WebXml.instance() and FacesConfigXml.instance() respectively via an interface instead of an enum. This way they can easier be mocked during unit testing.
BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0tag:blogger.com,1999:blog-5396570633771229267.post-49349111438889706602018-04-07T12:19:00.012+02:002023-04-05T13:42:16.558+02:00Do not use org.glassfish Mojarra 2.4.0!Look, there's a Mojarra 2.4.0 in Maven Central!
What is this? Is JSF 2.4 already there?
No, JSF 2.4 is not there. Technically speaking, Mojarra 2.4.0 represents the latest state of the master branch as it was during the transfer from Oracle to Eclipse. That transfer took place when JSF 2.3 specification was already released and JSF 2.4 specification has still to be started yet. JSF 2.4 is farBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com2tag:blogger.com,1999:blog-5396570633771229267.post-32311114779857260142018-01-03T17:34:00.000+01:002020-07-18T20:22:37.009+02:00OmniFaces 3.0 released!OmniFaces 3.0 has been released!
The minimum requirements have been upgraded from Java 1.7, JSF 2.2, EL 2.2, Servlet 3.0, CDI 1.1 and (optional) BV 1.1 to Java 1.8, JSF 2.3, EL 3.0, Servlet 3.1, CDI 2.0 and (optional) BV 2.0. WebSocket 1.1 hasn't been upgraded since, so it's still the same. As of now, OmniFaces 3.0 is technically still backwards compatible with EL 2.2, CDI 1.1 and BV 1.1, as BalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.com0