6 results for technology, hibernate...

JSF Modal Goodness

posted by Jake on

Meet the new web. The simpler the better. The cleaner the better. The more pleasing the colors the better. The fuzzier feelings the better. The latest fuzzies have been brought on by a slew of modals. Previously, we haven't used many modals in our layouts and designs, so here's the first working pattern on how to get this kind of stuff working.

This solution allows:


  • Content to appear in a modal

  • Validation errors post back to the modal

  • Edits made in a modal persist back to the database

  • Success messages appear on parent page

Audit History with Hibernate Interceptor

posted by Jake on under Data & Databases

The goal:
Create a history audit tool that:


  • Fires automatically

  • Tracks only selected fields

  • Categorizes those fields

  • Saves old vs. new data

Issues we'll cover:


  • Interceptor config

  • Data types

  • Dependency Injection

  • Alternate EntityListeners

One solution:
The one option that I found that met all these requirements was the Hibernate Interceptor. There may be better alternatives for you if your requirements differ.

Hibernate Boolean Conversion

posted by Jake on under Data & Databases

The object-relational mapping world of JPA and Hibernate has made a lot of things really nice and easy. As with any framework of this sort, however, it becomes frustrating when the pieces that are supposed to provide magic ease of development do not work as expected. The frustration is only exacerbated when the docs are skimpy.

Type conversions usually happen automatically in JPA, but possibly due to some databases incredibly not having implemented boolean fields yet (Oracle and pre-5.0 MySQL), an extra bit of help in conversion is needed.