klionbad.blogg.se

Image link icefaces
Image link icefaces







The code examples throughout the article are wherever applicable created and tested on Mojarra 2.1.3 and Glassfish 3.1.1 which are at the time of writing just the newest available. For more detail, see also the empty string madness article.

image link icefaces

Glassfish for example does not have this problem. Long, Integer, Double, Boolean, etc), because this EL parser would immediately coerce an empty string to the wrapped primitive's default value such as 0, 0.0 or false before returning the value to JSF. This will prevent that the aforementioned context parameter will fail for primitive wrapper managed bean properties (e.g.

image link icefaces

JBoss AS, WebSphere AS, etc) or at least a servletcontainer which utilizes Apache EL parser, then we also assume that you've the following startup VM argument set: .parser.COERCE_TO_ZERO=false If you're running Tomcat or a clone/fork of it (e.g. The above will prevent that model values get littered with empty strings when the enduser leaves input fields empty. We assume that you've configured JSF to interpret empty string submitted values as null by the following context parameter in web.xml: _EMPTY_STRING_SUBMITTED_VALUES_AS_NULL true We assume that you're able to create JSF forms and beans like as demonstrated in the JSF 2.0 tutorial of this blog (model, view and controller). We assume that you're familiar with JSF basics.







Image link icefaces