This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J4J Tag Library rendering problems

 
Klaus Schuster
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

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.

 
Klaus Schuster
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup. Facelets "adopts" custom tag libraries, but you have to tell it about the tags.

One of the downsides, however, is that straight JSP/JSF will detect invalid tag attributes. Facelets will ignore them.
 
harinder singh
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of Jboss you using ? it does not work for me when I upgraded the jboss to Jboss 5.0.1.
(It works for Jboss 4.2.3)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic