If you’ve come across Seam’s <s:convertEntity> and wondered why isn’t one there for JSF, here you go: Before using this, you should’ve designed your domain model to extend a Base Class (do it, it’s a good practice). In my case, I have BaseIdentityEntity which has an @Id, @Version properties import java.io.Serializable; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; [...]
At my current contract, I’ve been using the popular EXTJS javascript library. In order to get up to speed faster, I’ve started a small project to assist my learning. I thought about using a number of back ends to support my project, but decided on Grails after reading about the built-in JSON converters. Getting started [...]
Wednesday, August 20, 2008
Creating tag libraries using facelets might be cool but needs more redundant infrastructure than the new JSP tag libs (which doesn’t need tld declaration or web.xml context params). However once your done, building reusable tags on the fly (with no java code) can be pretty slick. Here are the steps for creating a simple tag [...]
Wednesday, August 20, 2008
It’s a common occurrence in the Java consulting world, as ridiculous as it is, I see it all the time. I do into a new development shop to help build a large webapp. Since it’s a large webapp, someone has decided they needed to buy licenses for Web* app server. And since they’re using the [...]
If your project has a lot of unit testing in Java and you use continuous builds (CruiseControl) to automate, it is often difficult to automate tests which connect to Database (Dao and integration tests). For most companies, having a dedicated Oracle schema for testing is expensive. Also, sometimes, developers need their own instances of schemas [...]
This is a variation on this article. Having never been a big fan of writing XML, I’ll gladly opt for the XML-less version. The first example online I found has some formatting issues and just seems a little hard to follow. My step by step example follows after the jump. Call it the “Grails extended [...]
First of all, make sure you’re looking at the Tomcat 5.5 JNDI HowTo, not the Tomcat 5, and definitely not Tomcat 4. Yes, I know this sounds obvious, but once you start googling you’ll find it’s hard to distinguish the versions. Place a context definition in /META-INF/context.xml – this is the preferred 5.5 per-application method [...]
Note – If you’re looking for Hibernate Composite-Id example using xml configuration, read our earlier post here. Entities must define an id field. Typically a generated id is fine for most cases, but sometimes we need to add multiple fields corresponding to the database primary key. (legacy database?). The id can either be simple or [...]
Astute readers of my last Acegi article will note that Acegi has been assimilated into the Spring project, and is now called Spring Security. This next example is how I was able to get Spring Security running on my webapp. I decided early on that I did not want to mess up the other developers [...]
Note; This was my first day of adding Acegi to an existing webapp. You can find a lot of Acegi security framework examples on the web these days. Unfortunately, nearly all of the examples use Acegi use the pre 1.0 version, which is before someone removed the SecurityEnforcementFilter.. The official description of this event follows: [...]