File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSF2, MyFaces2, and Tomahawk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF2, MyFaces2, and Tomahawk" Watch "JSF2, MyFaces2, and Tomahawk" New topic
Author

JSF2, MyFaces2, and Tomahawk

arnaud fontenoy
Greenhorn

Joined: Dec 03, 2010
Posts: 2
Hi !

I'm struggling for days to have Tomahawk work with MyFaces2.
My versions are :
- MyFaces JSF Core-2.0 API 2.0.1
- tomahawk20-1.1.10
- JDK compliance 1.6

I use templates and my faces pages extension is xhtml.

I test it onto Tomcat6.

My problem is that I can't have t:dataTable (with sort headers) or t:dataScroller work.

When I activate javascript use in web.xml (with org.apache.myfaces.ALLOW_JAVASCRIPT param) :
- when I try to navigate through my table paging, I get a javascript error "myfaces is undefined"

I thought this is a problem with the extension filter of my web.xml, but I can't see what's wrong !

When I de-activate javascript use :
- when clicking on "next page" (paging using dataScroller), a request is done to the server.
- The page is displayed back. The url displays the index of the page to display...
- but the displayed page if always the first one.

Maybe I do something wrong, but I did not found any tutorial about Myfaces2 and Tomahawk, so I did like I used to in JSF 1.2.

Here is my web.xml




Please help !
Does anyone had Myfaces2 and tomcatdatascroller work ?
Is there a step by step tutorial available explaning how to to this ?
arnaud fontenoy
Greenhorn

Joined: Dec 03, 2010
Posts: 2
So I made it work.

In fact I think the problem was due to the use of facelets.
I rearranged my page not to use templates and ui:compose, and it worked.

I made it work with servlets too. In fact my eclipse project used "Dynamic Web module 2.5".
I did a test using "dynamic web module 3" and it worked.

So I created a new projet in dynamic web module 3. I imported everything from my old project.
And it works.

Hope that helps !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF2, MyFaces2, and Tomahawk