Is JSF 2.0 View Scope back-button safe?

To start, the view scope is bound to a particular page/view. Multiple views won’t share the same view scoped bean. The view scope starts with an initial GET request and stops when a POST action navigates with a non-null return value. There are in general the following scenarios, depending on whether the browser is instructed … Read more

Work around for faulty INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL in Mojarra JSF 2.1

This is not Mojarra specific. This is Tomcat specific (JBoss uses Tomcat as servletcontainer). Add the following VM argument to startup options. -Dorg.apache.el.parser.COERCE_TO_ZERO=false To my experience, this one should actually only apply on Number properties (int, long, etc), however since a certain late Tomcat 6.0.x version (at least after 6.0.20) it seems to be broken … Read more

How to get rid of WARNING: PWC4011: Unable to set request character encoding to UTF-8

JSF/Facelets uses by default UTF-8 to decode HTTP request parameters. GlassFish itself uses by default ISO-8859-1 do decode HTTP request parameters. HTTP request parameters can be parsed and decoded only once and this happens whenever a request parameter is requested by the code for the first time like so request.getParameter(“name”). So, if a request parameter … Read more

JSF implicit vs. explicit navigation

This is somewhat subjective, but ala, it boils down to the following: Navigation rules in XML are a maintenance hell. Using navigation rules suggests that the web application in question suffers from the “one URL behind” problem which causes bad user experience (pages are not bookmarkable). Using navigation rules suggests that the web application in … Read more

Should PARTIAL_STATE_SAVING be set to false?

Should PARTIAL_STATE_SAVING be set to false? Only when you encounter a general defect related to partial state saving in your webapp which can really not be solved/workarounded the other way. Partial state saving has namely major advantages as to overall performance and memory usage. See also Why JSF saves the state of UI components on … Read more

JSF component binding without bean property

It’s been put in the default EL scope during building of the view tree (that’s when all binding attributes — and attributes of tag handlers like JSTL <c:xxx> and JSF <f:xxx> — are being evaluated). It’s being shown by normal EL means during rendering of the view tree. Rendering of the view tree happens after … Read more