- I don't think this book showcases JSF in a particularly good light.
- If you've used technologies like ASP.NET, you are used to IIS shielding you from the idiosyncrasies of web browser variations. It sniffs out your web browser and serves up a page that your browser will always work with. This is not the case with JSF. It's brittle. You need to have a good grasp of DHTML CSS XHTML to boot and have accumulated experiences to cope with browser variances.
- To help you achieve these goals an excellent companion to this book would be HTML Dog:The Best-Practice Guide to XHTML and CSS (Paperback) 0321311396 by Patrick Griffiths and his associated website HTMLDOG.
- I feel the authors could do with reading this to compensate for examples that don't behave well, predominantly in IE7, but sometimes with Firefox too.
- We all know Microsoft sticks two fingers up to standards and does its own thing. But in reality more users use IE7 than the better products like Firefox or Opera. So we developers have to compensate for this and cater for both in world of JSF.
- On top of this you have to cope with the complexities of the JSF lifecycle which gets pretty hairy when you start to add things like Ajax into the mix.
- The author does a sloppy job of packaging source code with all the pre-requisite jars. This happens in loads of places. Commons-logging being missing is a regular bug-bear.
- I particularly found tracking down the jars for Ajax4jsf to be a particularly painful experience, not helped by the missing jar dependencies in Maven repository and JBoss's acquisition of the project and being unable to download latest set from JBoss site. On top of the supplied ajax4jsf.jar (1.02) and oscache-2.3.2.jar, I found I needed commons-bean-utils (1.7) commons-digester 1.8 commons-logging-1.1.1, commons-collections-3.2.1.
- My gripes with the examples:
- Tiles examples. JSF and Tiles don't play ball from what I've been able to ascertain from forums. So the book should cut these examples out. Facelets is the answer. The book covers this topic in Ch10
- Shales-Validator in Ch13 won't deploy. Struts dependencies. Doesn't sound right.
- Ch13 SpinnerLib/ResourceLocatorTest example doesn't work in Glassfish.
- Seam example. Couldn't get to work in the configuration I wanted. I believe commons-el.jar was missing in this example too. The book recommends Tomcat 5.5 with JBoss embedded server to run this. Now I have Tomcat 6, Glassfish and JBoss 4.2.2.GA, and couldn't get it to play ball. The author flips to Myfaces implementation of JSF. I think JBoss 4.2.2.GA doesn't like Myfaces.
- See forum.java.sun.com/thread.jspa?messageID=10296408?
- and jboss.com/index.html?module=bb&op=viewtopic&p=4158195#4158195
- The basic Ajax example doesn't work in Firefox
- The custom JSF Spinner components are really lousy. Only the Javascript version approaches production ready quality, in either browser.
- The deletingRows example in Chapter 5 behaves lousily in IE7. The checkbox doesn't activate the rows, you have to click on rows themselves to get the controls to respond.
- In chapter 5 there is a database example. I initially Googled to work out how to set up a JDBC resource in Glassfish. The book actually covers this much later on, so a forward reference could have saved some time here.
- Unfortunately the references to setting up JDBC connection pools were dated.
- The Tomcat section was out of date and used Postgres. Nowadays, MySQL is shipped with Glassfish, so I'd have thought that would have been a better choice.
- See theserverside.com/discussions/thread.tss?thread_id=25459#254626 for my Tomcat 6/MySQL solution, after wading through the Tomcat 6 docs.
- A minor point is MySQL setup in Glassfish uses tabbed pages rather than a next button.
- Ch13 Popup technique 2 doesn't work in IE7.
- LDAP examples based on OpenLDAP. This is a pain to set up. You have to download source and use C compiler to get application working. Too much like hard work, if you're doing this for academic appreciation. If you need an LDAP server. Try OpenDS instead of OpenLDAP. Easier to setup.
- I also particularly disliked to smattering of API sound-bites. They really detracted from the overall flow of the book.
- Also disliked the way code snippets were referenced without being in context of class, so you don't know what you are looking at. If you are going to discuss things with code snippets, at least present the full source first. (James Holmes did the to good effect with Struts Complete Ref)
- Ch13 covers a lot of ground fast. Could have done with explaining things a little more.
- Other discrepancies:
- P534 Remove extra comma after ProcessZipCodeSelection. Wrong is source code too. Was a little devil to track down & debug. FadeAnything Ajax example in start.jsp for form-completion example of Ch11.
- P551 Accordion renderer. Refactored with helper method
- CH11 Extra spaces in one of Backing bean java source files with NO DATA/City/State
- Ant script doesn't work for some of scripts in Ch13.
Change path id="classpath" to include different fileset as follows:
<fileset dir="${builddir}">
< include name="**/*.jar"/ >
</fileset>
- (Ant still won't work for Applet. Have to fix source of Chart.java to:
for (double v : values) { to
in order to make variable v accessible.. Missing ChartPanel.class. I also packaged both classes at same time, manually compiled source & moved both classes to folder com/corejsf under web folder. Then ran ant script to package & deploy.
- On the flip side, the highlights for me were the a) The JSF-RicoAccordion example, and Shale. But the Shale example didn't work quite so well in IE7, There is an unexplained Javascript function call "nameChanged('clear')" in the onblur methods of Payee Information/name Bank Information/name. So once again some sloppy details spoils functionality. Also onblur seems to not work in IE7. Fields are supposed to return to original style as you tab out of them. HtmlDog probably has the answer for this. The layout of this example doesn't give particularly good visual cues as to when you enter the sub form. If I'd written the example, I'd at least have given the sub-form a different background colour so you realise you are in sub-form. Also I'd have begun a second row of tab markers, so you could still see where you are in the wizard process. I initially thought I'd gone back to first page of parent form!
- There are plenty of examples, which help give you good foundation in JSF.
- I've fired off countless posts on my findings through the books associated website, so hopefully when authors get a moment, they can reflect on these points to improve their product.