I am using MyFaces 1.2.5 with Facelets and some Tomahawk libraries.
I am trying to use default actions with the J4J Tag library:
Default Action for a JSF Form
As a reason of using Facelets my xhtml File looks like as follows (only Code snippet):
I copied the j4j.jar File into the WEB-INF\lib folder.
In my web.xml I defined the following:
When I load the page, and I view my source code, I can see the tag <j4j:defaultAction></j4j:defaultAction> in Plain text. there is no rendering to java Script code.
Is there something else to do ?
Thanks in advance.
Joined: Feb 10, 2009
I found the solution!
The problem is, that I am using facelets together with the J4J library.
For that kind of implementation, you need to do the following steps for getting the default Action attribute:
- copy j4j.jar into WEBINF\lib
- Define a File named: "j4j.taglib.xml" in your META-INF folder with the following input:
In your xhtml Facelets File set the header:
and put the j4j Attribute with an ID in your form details to your commandButton tag:
thats all to use the default Action in JSF using Facelets.