Oh. <h:link> should probably be an s:link or a h:commandLink.
h:commandLink doesn't work though:
Search: This link is disabled as it is not nested within a JSF form.
And I still have to find out if s:link is supported...
Sorry, the software is bleeding on you ;) I am using an SVN snapshot of JSF 2 because the new bookmarkable components (h:link and h:button) are not currently in a JSF 2 release. The bookmarkable components are part of the Red Hat contribution to JSF 2 and thus we want to be able to highlight their usage. You can either disable the links in the example temporarily or grab the Mojarra trunk, build it, and deploy the JARs to your local repository.
Here are the steps to build a snapshot of Mojarra and deploy to your local repository (you need to use a java.net account to check out):
svn co https://mojarra.dev.java.net/svn/mojarra/trunk mojarra-trunk cd mojarra-trunk ant main mkdir -p ~/.m2/repository/javax/faces/jsf-api/2.0.0-PR2_1 cp jsf-api/build/lib/jsf-api.jar ~/.m2/repository/javax/faces/jsf-api/2.0.0-PR2_1/jsf-api-2.0.0-PR2_1.jar mkdir -p ~/.m2/repository/javax/faces/jsf-impl/2.0.0-PR2_1 cp jsf-api/build/lib/jsf-api.jar ~/.m2/repository/javax/faces/jsf-impl/2.0.0-PR2_1/jsf-impl-2.0.0-PR2_1.jar
Sorry that kind of sucks. The deployment of Mojarra to Maven 2 is a lot on the rough side.
I'm also finding that h:commandLink is not quite working correctly in Mojarra for some reason. I haven't dug into it yet.
We don't have s:link ported yet. Though theoretically if you drop the jboss-seam-ui.jar in the classpath, it just might run.
Oh, in your case, the problem is that an h:commandLink must always be inside of an h:form to work. The problem I am having is with h:commandLink in the SVN snapshot.
i didn't know Seam 3 was available yet. Where can we download (only SVN nightly??)
It's not available as a download. You have to check out SVN. Even then, it is very rough. We are starting from one angle of creating examples that work against Web Beans and JSF 2 and then slowly trickling in some features from Seam 3 as they are ported. Shane is currently working on assembling the security module, but it looks like a construction zone right now, rightly so ;)
Thanks. I got the JSF2 snapshot, updated JBoss to Webbeans 1.0.0.PREVIEW1 and now I can search for hotels :)
Btw, you can use username guest and no password to check out JSF (for some reason didn't work with my
newly registered java.net account)
The last step should be (jsf-ri instead of jsf-api):
cp jsf-ri/build/lib/jsf-impl.jar ~/.m2/repository/javax/faces/jsf-impl/2.0.0-PR2_1/jsf-impl-2.0.0-PR2_1.jar
I also changed jsf-upgrade-tool/pom.xml to use 2.0.0-PR2_1 and ran it again to update JBoss.
As for exploded deployment, it would probably be better the build the seam-booking.ear dir in the
temporary directory and do a move afterwards. Otherwise one can get incomplete deployment errors.
Used to happen a lot in JBoss 4.2, might be addressed somehow in JBoss 5 though.
Awesome! Good job on getting it working. I should have more functionality ready in the next couple of days...with even more cool JSF 2 goodies to play with.
As for copying to JBoss AS 5, yes, I am going to take a look at that to make sure I am copying in the right order. What I am hoping is that if I copy everything except what triggers the deployment first, then copy that magic piece last, it will all work. It is much cleaner than having to copy more than once. I have some nice updates to that antrun task that should smooth things out a bit more (I'm testing on JBoss AS 5).