Seam + Google App Engine

I was looking around to see if anyone got Seam working on the Google App Engine for Java… and the short answer is both yes and no. Here are the 3 links that will tell you the state of the state as of this writing…

  • SeamFramework – The people who developed Seam lay down their perspective…
  • Get it Working – One developer got it working, with more than a few tweaks and hacks…
  • Overview from Michael Yuan – a quick list of what’s good, what won’t be supported, from a Seam expert…

Short answer, it’s not there yet, at least not with all the features and functionality you would be using Seam for in the first place…

Nesting Seam Validation Tags

Here’s an interesting one that caused me to stumble for a while… If you are leveraging Seam’s field-level validation and are mixing it with Rich Faces components, you have to be conscious of how you nest your tags.

For example, this caused validation to be skipped:



    
        
            
                
            
            
                
            
        
        
    

When clicking on the save button, you will bypass validation and go directly to the save() method on the named component myService.

To fix this, you need to nest the tags within each tab panel:



        
            
            
                
            
            
            
            
                
            
            
        
        

Viola, now your required tags are properly enforced, as well as any Hibernate annotation validation that exists.

Seam on JBoss AS 4.2

If you want to run JBoss Seam 1.2 on JBoss AS 4.2, you have to take a few extra steps…

Luckily, those steps are chronicled here (by Michael Yuan) and here (by Nicolas Leroux). Oh, and Michael’s site has updated samples from his book.