Tag Archives: Java
New book on Apache MyFaces coming up!
For over a year I have been working on a book about the Apache MyFaces project for Packt Publishing. The book is nearing completion and is expected to be released February 2010. The book will be covering the Tomahawk, Trinidad, … Continue reading
Oracle ADF: set focus to input field in data table
At my current client we had the first user acceptance test of a new Oracle ADF application. We have a lot of data entry pages in our application, where database records are presented in editable tables. Each table has a tool bar, with a “Create new record” button on it. One of the things the users noticed during the test, is that when they created a new record, the new record showed up in the table and was selected, but the first input field in the record didn’t have the input focus. I looked for a setting in ADF to set the input focus after creating a new record, but didn’t find anything. So I created my own solution…
Oracle ADF and Virtual Private Database
As you probably know, Oracle ADF is a complete JEE application development framework from Oracle. It is targetted at companies that already have an Oracle Database and perhaps legacy applications developed with Oracle’s “Forms” technology. The client I’m working for at the moment is such a company, and we’re developing an application in ADF that is going to replace (a part of) their Forms application eventually.
One would expect a framework designed by Oracle for use with an Oracle database to have excellent support for specific features of the Oracle database. For a lot of features this is true, but at my client’s, we were unlucky to have chosen to use a database feature that is not supported that well in ADF. That is “out of the box”. Wit a lot of “trial and error” and some help from some experts at the forum on Oracle’s Technology Network, I managed to get it working. Read on to find out what problems I encountered and how I solved them.
Apache MyFaces Extensions Validator introduced
In a typical Java EE web application, there’s almost always the problem of where to put the validation. Of course there’s only one place where validation belongs: in the model. So if you’re e.g. using EJB as persistence layer, the EJB Entities is where the validation code belongs. However, from a usability point of view, one never wants to leave all validation out of the UI code. This often leads to duplicate validation code. While not ideal, duplicate validation code is often considered as inevitable.
Yesterday I stumled upon Apache MyFaces Extensions Validator (a.k.a. ExtVal, formerly sev-en), a JSF based solution that looks very promising. I did not have a chance to try it myself yet, but it promises some nice things:
RegEx testers compared
Regular Expressions are a very powerful tool for developers. The can be used for various jobs. A common use is for validation of user input agains a pattern. This can be done in code (using a method from the java.util.regex package) or e.g. with a JSF validator component (either home brew or ready made). Another use for regular expressions is doing advanced search-and-replace operations on (e.g.) source code. Most IDEs and the more advanced text editors offer search-and-replace based on regular expressions.
Whatever job you use regular expressions for, one thing is for sure: composing a regular expression is never easy. Therefore, testing a regular expression before using it is always a good idea. There are a lot of online regular expression testers out there. I tried some of the more advanced ones recently and thought it was a good idea to share my findings.
JFall 2008
Last wednesday, I visited JFall 2008, the half yearly conference of the Dutch Java User Group, NLJUG. It was held in Spant!, a theatre in Bussum, The Netherlands. There were many interesting sessions and I thought it might be interesting to share my opinion about the sessions I attended.
