It is almost impossible to make html input file elements look the same as the other parts of web applications. Browsers provide few possibilites to style them or nothing at all. However, within the newer versions of browsers, you might apply some tricks to alleviate this common styling problem, and one neat way, explaining how […]
Tag: JSF
Customizing JSF Required Field Messages per Component Instance
JSF is nice that it provides some useful built-in features to validate entered values or if provided any required one, but it fails at providing enough mechanism to let developers customize those features at the level of each component instance. This is a common drawback of JSF specification in general. We specify that user input […]
Mocking ResourceBundle
If you want to unit test a method that depends java.util.ResourceBundle, and want to isolate bundle access code with mocking ResourceBundle, using for example, JMock Dynamic Mocking Library, you will face with a restriction, that commonly used methods, such as getString(key) are defined as final in ResourceBundle class. There is no way to extend and […]
Uncaught Exception Handling in Java Server Faces
First comes a little flashback on how we can deal with uncaught exceptions in web applications. As you probably know, there exists a general exception/error trapping mechanism for servlet/jsp based web applications. We simply add error-page definitions in web.xml file for uncaught exceptions or http status codes to show users custom error pages instead of […]