0

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

Vasil Lukach
  • 3,658
  • 3
  • 31
  • 40
Naveen Kocherla
  • 499
  • 7
  • 17
  • For the first part: https://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration is probably as good as you get here. For the second part: what do you mean with "quoted"? And why do you want to continue using them in `faces-config`, when one of the major improvements was to get rid of that bloat? – mabi Mar 14 '14 at 15:02

1 Answers1

0

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

  6. 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.

  7. 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.

Community
  • 1
  • 1
trims
  • 453
  • 4
  • 9
  • 1
    Interesting reply, however, even if you say `it's very buggy` for some Richfaces aspects, you totally forget to include references to prove what you're saying. – Aritz Mar 16 '14 at 10:16
  • 1
    References? Anyone can download and check Richfaces and listed issues. I will be very happy if some of them are fixed but I think most of them are still there since Richfaces team is working on 5th version. I hope that it will not have all those issues. – trims Mar 16 '14 at 18:32
  • 1
    You talk about some bug report you made to richfaces team but you don't provide a link to it. You say you don't know if it has been already fixed. Isn't it better to provide the reference in order for the OP and future audience to be able to check its status? Just think about people viewing this post one year later. Links are always welcome for this kind of things. – Aritz Mar 16 '14 at 22:17
  • Speaking as just such a person viewing this post one year later I confirm. Please provide the links requested, and/or your one fixes. – user207421 Jun 17 '15 at 08:43