Can Bootsfaces be used with Richfaces? - jsf

I have a web application with the following:
JSF 2.2.6
Java 1.7
Tomcat 8
Richfaces 4.5.7
Omnifaces 2.2
I would like to enhance the look and feel of the web app to use Bootsfaces. I have added Bootsfaces jar to my project (via .ivy) and rebuilt.
Before even updating the first web page to use Bootsfaces in the project I wanted to see if there were any conflicts after adding the Bootsfaces jar. It seems there is. I am getting the following errors shown in Firebug:
ReferenceError: jsf is not defined
TypeError: RichFaces.ui is undefined
Does anyone know whether Bootsfaces works with Richfaces and if so could they kindly provide a link with migration steps to follow?

Currently, we, the BootsFaces team, do not support RichFaces. We strive for compatibility with PrimeFaces, OmniFaces, AngularFaces and - if possible - ButterFaces. Neither RichFaces nor ICEFaces are on our list.
However, if someone were to join our team in order to support RichFaces, they'd certainly be welcome!

Related

What needs to be change when migrationg from jsf 1.x to jsf 2.x , richafaces 3.x to 4.x

I am new to jsf.
I am working on migration project.
In this I need to migrate from jsf1.2 to 2.1
and richfaces as well..
In general what I need to change?
I have one more requirement that navigation rules must be quoted explicitly in faces-config.xml?
How to write these rules in faces-config.xml?
Thanks in Advance
First you should understand that this is a painfull to migrate from JSF 1.x to jsf 2.x but it is even more painfull to migrate from Richfaces 3 to Richfaces 4.
JSF 1.x to 2.x upgrade can be done independently from Richface upgrade. So I would recommend you first update JSF and check that everything is working and only after that try updating Richfaces. Look at this question about JSF migration for more info. Or just google it. There is a lot of info about it.
Richfaces 3 to 4 migration is very very painfull because JSF 2 introduced it's own ajax and you will need to change a lot of attributes all overt the project. But the biggest pain is that Richfaces 3 work much more stable than Richfaces 4. Richfaces 4 is very buggy. I can list some bugs that I encountered and some solutions for them.
rich:autocomplete is very buggy. Not sure if it is fixed already
but when I tried using it it was not working with Spring in
composite views(<ui:include pages). After I sumbitted bug report
they seem to do something there but not sure if this works now. I
didn't check. https://issues.jboss.org/browse/RF-11469
I would advise you to replace this component with simple jQuery UI
autocomplete component with some spring mvc controller on backend.
rich:tabPanel is very buggy. Separate tabs do not have action
attribute any more. This was breaking functionality with initing tab
contents when the tab was opened with ajax. Immediate attribute also
not working for tabs. Here is the issue on jboss jira: https://issues.jboss.org/browse/RF-11417 workaround is really stupid.
I just went into source code of richfaces and made it working.
Exception handling is very buggy. Seems that exceptions are just
swallowed in many places in richfaces source on ajax requests so you
can not handle them the right way.
I went again into Richfaces code and removed exception swallowing by
throwing out exceptions.
rich:fileUpload component can work and can not work for you. You
can get request prolog can not be read exception in some
cases(This is what I was getting). And This is connected with new
app server feature of reading multipart request into
request.getParts(). And Richfaces do not handle such situation and
error out because inputstream of multipart request is already read
fully.
I again went to source code of Richfaces and added catch for
situation when request.getParts is not empty. I even created an
issue on Jboss but guys said this works on new Jboss server that's
why it is not an issue(I use tomcat). https://issues.jboss.org/browse/RF-13061 the issue is close still it is not working on tomcat.
A lot of issues on client side. By default multiple forms will not
work on your pages like they were working in jsf 1.2 and richfaces 3
because the viewstate id is not updated where and when it needs to
be.
To fix this you will need to add additional script. It is described
in the answer to this question
Also on the client side you should know that if in the response of
any ajax request you will have some js that will fail everything
stops working. You can not have js errors inside xhtml. The page
will freeze completelly. Also it is tricky to have CDATA tags on
the xhtml pages. They can also fail.
Richfaces messages work the way that sometimes they show up and
sometimes not. They are ajax rendered but seems that they can break
the page. Ajax reposnse can have an update that should update
messages that is not rendered on the page and when it will not find
this message in your html it will stop rendering everything that is
left to update. As a result your links and buttons will not rerender
anything in some cases.
Here evaluating limitRenderattribute helps a lot.
It is a short list. There probably a lot more to be aware of and that you will see after update =)) Richfaces 4 are still buggy.

JSF collapsibleSubTableToggler gives error

This is about JSF 1.3. I have a requirement of collapsible/expandable datatable and I tried the solution using <rich:collapsibleSubTableToggler> which I found in this site:
http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=subTableToggleControl&skin=blueSky
This is exactly as I wanted and it gives an error given below in run time
Error Rendering View[/pages/wxyz/xyzzz.xhtml
<rich:collapsibleSubTableToggler> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: collapsibleSubTableToggler
Can anybody suggest me a solution or an alternative?
The http://showcase.richfaces.org site showcases RichFaces 4.0. Your error message indicates that you're using RichFaces 3.x. You should then not be looking at the showcase for RichFaces 4.0, but at the showcase for RichFaces 3.3 http://livedemo.exadel.com/richfaces-demo/richfaces/actionparam.jsf
In order to use the rich:collapsibleSubTableToggler, upgrade to JSF 2.x / RichFaces 4.0.
By the way, JSF 1.3 doesn't exist. Perhaps you meant to say JSF 1.2.

Richfaces 4.1 with JSF 2.1.7: resources are all in the body instead of head of the html document

I was wondering if anyone has experienced a similar problem.
I just tried upgrading to JBoss AS 7.1.1 which comes prepackaged with JSF 2.1.7. Before I was using JSF 2.0.4 and everything was fine with RichFaces (btw I am using 4.1.0.Final in both scenarios). Now with Mojarra 2.1.7, it seems that all my Richfaces resources such as javax.faces.resource/richfaces.js.seam and javax.faces.resource/richfaces-event.js.seam are being included in the body of the rendered html page instead of the head. I am getting a lot of Richfaces is not defined errors because I am trying to use js richfaces methods elsewhere in my code. It just won't work since all the richfaces js files are loaded in the body.
I have tried researching this issue online and I can't find any info on it. I have an h:head tag in my document so that isn't the issue.
Any help would be appreciated. Thanks.

How to upload file in RichFaces 4?

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.

A good extension to JSF that adheres to JSF2.0?

I have been looking for a JSF extension (Richfaces, IceFaces, and more) but all seem to be according to JSF1.x and ones for JSF2.0 are still alpha or in development and most of the documentation assumes you're using JSF1.2.
Is there any production well known extension available?
RichFaces 3.3.3 is compatible with JSF 2.0. It has however no full JSF 2.0 integration yet.
PrimeFaces 2.0 is already JSF 2.0 ready for months, it was the first to do so.
My opinion would be biased if I say PrimeFaces I guess :) So for real life experiences please see: http://www.primefaces.org/whyprimefaces.html

Resources