• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

J4J Tag Library rendering problems

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic