Now that Seam is deprecated, and as PDF where not given to anyone, what are the alternatives to generate a pdf file using facelets templating and backing beans ?
I did it with Seam some years ago and it was very smooth, and I would rather not do it programmatically (which in my opinion is never a good idea to generate views...)
OK...
This thread at jboss explains why it was not a so good idea and why it was deprecated. Thanks to Tiny and Trims for their insight.
I was confounding templating and JSF rendering.. like, in fact, Facelets is a good templating tool, but really focused on web.
More generic tools does exists to template PDF, like FlyingSaucer or XDocReport as presented here
It should be possible to create a XSL-FO through a Freemarker template and pass it to Apache FOP to generate the real PDF.
Related
Related to the last comment on this question, i would like to know if anyone managed to use the HTML5-Fileupload of Primefaces 3.0 with an older Primefaces version.
We have a lot of trouble with the old flash-version of the fileupload.
I know that the best option would be to update the whole project to the new primefaces version but it´s not possible for this project.
This is not going to be trivial. That you're already asking this question already indicates that it's going to be a long journey. I'd rather use a barebones and to-the-point file upload component of another component library such as Tomahawk's <t:inputFileUpload>. It only doesn't support asynchronous uploading and you need to make the submit button of the form a non-ajax one, but it does the job you want it to do without much hassle.
You can find in this answer detailed step-by-step instructions how to integrate and use it in your project: JSF 2.0 File upload. In case of PrimeFaces, you only need to make sure that you have removed PrimeFaces' own file upload filter from the web.xml, otherwise it would consume the uploaded file before Tomahawk's own filter get the chance.
Thats very difficult, I have many problems with fileupload and finally migate to 3.0 but witch are problems?.
If you wanna to change fileupload you will can change source code in library is not very smarted if you desnt know jquery ui o you can use other framework or use directly.
http://www.matlus.com/html5-file-upload-with-progress/
good luck
There is an existing web application created in Struts. There is a need to totally redo the UI. What is the best way to improve the UI? Will intrducing JSF components like PrimeFaces into the existing Struts code be a good idea? Or what are the options available?
It is hard to join Struts with JSF, since those are two different frameworks trying to do the same thing. So, in practice, you'll end-up rewriting your application. JSF pages and JSP (which are used by Struts) have different livecycle, JSF Beans are working in a different way then Struts Actions.
The point is to make use of that what you already have and make your JSP look better. I would choose good JavaScript UI library and rewrite JSP pages using it. ExtJS is a very good, if you want complete solution. If you want to create custom solution looke at jQuery, Backbone and Mustache templating engine.
I need to make a file upload function in JSF 2 so I was searching about it and found it is possible to do with Tomahawk, which I think is not very stable with JSF 2.
I'm using RichFaces, so I look for it and found this which I think more simple, but I'm using richfaces 4.
So I wonder if there's a way to do this with richfaces 4 or do this with JSF 2 only.
Any idea, suggestion ?
You're looking at RichFaces 3.3.x demo site. You need to look at RichFaces 4.x demo site. The <rich:fileUpload> demo page contains a concrete example with source code.
To do it with pure JSF2, you'd need to create a custom component and parse the multipart/form-data requests yourself. There's a blog about this with complete and concrete examples: Uploading files with JSF 2.0 and Servlet 3.0.
Using Tomahawk is only more easy. I'm not sure why you think that it's not very stable.
I want to use reCaptcha on my project with JSF. Corresponding primefaces component doesn't want to work properly inside wizard component. I decided to try to use the code from example for JSP http://code.google.com/intl/en-en/apis/recaptcha/docs/java.html I can not understand how best to remake it to JSF. The problem is in java code injection into JSP and result validation via FacesValidator.
Can someone have any ideas?
Take a look at tomahawk t:captcha on MyFaces SVN. The code only use the standard JSF API (it was updated to use JSF 2.0 ResourceHandler API), so it can help you to build your own using recaptcha.
I am using Struts Tiles with JSF to have one header, menu and footer across application. Is there any other like struts to have one header, menu and footer. Is this feature available in faceslets and what viewing technology would be better for easy development.
For JSF you've only choice of two view technologies. The good old JSP and the improved and XHTML based Facelets. Facelets is much more suited to JSF than JSP. It is a view technology and template framework in one. It provides great templating capabilities and since JSF 2.0 also composite components, while JSP basically only offers the <jsp:include> for templating, so that you're forced to create custom components with raw Java code (which is a bit opaque and a lot of tedious work in JSF) when you want to replace a repeated group of components by a single component. If you can, I recommend to drop JSP and Tiles altogether and go for Facelets when you want to develop with JSF. If you're going for JSF 2.0 as well, it would already be a major step ahead as opposed to JSF 1.x.
Facelets is the first choice for JSF. Your task can be easily solved with Facelets.