Sunday, April 14, 2024

OmniFaces 4.4 / 3.14.5 / 2.7.25 released!

OmniFaces 4.4 has been released!

It contains a major change in the LRU map which is used under the covers of @ViewScoped and <o:cache> in order to reduce the amount of AtomicReference instances leaving behind in the heap memory. For the remainder two new helper methods to create components have been introduced along a handful bugfixes.

You can find the complete list of additions, changes and fixes at What's new in OmniFaces 4.4? in the showcase.

Installation

Non-Maven users: download OmniFaces 4.4 JAR and drop it in /WEB-INF/lib the usual way, replacing the older version if any.

Maven users: use <version>4.4</version>.

<dependency>
    <groupId>org.omnifaces</groupId>
    <artifactId>omnifaces</artifactId>
    <version>4.4</version>
</dependency>

How about OmniFaces 3.x, 2.x and 1.1x?

OmniFaces 3.x got the same bugfixes as 4.4 and has been released as 3.14.5. This version is for JSF 2.3 users with CDI. In case you've already migrated to Faces 3.0 or 4.0, please use OmniFaces 4.x instead. OmniFaces 2.x got the same bugfixes as well and has been released as 2.7.25. This version is for JSF 2.2 users with CDI. In case you've already migrated to JSF 2.3, please use OmniFaces 3.x instead.

The 1.1x is basically already since 2.5 in maintenance mode. I.e. only critical bugfix versions will be released. It's currently still at 1.14.1 (May 2017), basically featuring the same features as OmniFaces 2.4, but without any JSF 2.2 and CDI things and therefore compatible with CDI-less JSF 2.0/2.1.

Tuesday, March 26, 2024

jsf.zeef.com is down

No panic. I've restored the lists below =)

JSF phases/lifecycle cheatsheet

  • fc = FacesContext
  • vh = ViewHandler
  • in = UIInput
  • rq = HttpServletRequest
  • id = in.getClientId(fc);
1 RESTORE_VIEW

String viewId = rq.getServletPath(); fc.setViewRoot(vh.createView(fc, viewId));

2 APPLY_REQUEST_VALUES

in.setSubmittedValue(rq.getParameter(id));

3 PROCESS_VALIDATIONS

Object value = in.getSubmittedValue();
try {
  value = in.getConvertedValue(fc, value);
  for (Validator v : in.getValidators())
    v.validate(fc, in, value);
  }
  in.setSubmittedValue(null);
  in.setValue(value);
} catch (ConverterException
    | ValidatorException e) {
  fc.addMessage(id, e.getFacesMessage());
  fc.validationFailed(); // Skips 4+5.
  in.setValid(false);
}

4 UPDATE_MODEL_VALUES

bean.setProperty(in.getValue());

5 INVOKE_APPLICATION

bean.submit();

6 RENDER_RESPONSE

vh.renderView(fc, fc.getViewRoot());