1 Reply Latest reply on May 24, 2013 4:15 PM by bleathem

    Going from RichFaces 3.3 to RichFaces 4 - any success stories?

    ibenjes

      Hi

       

      I am currently migrating a large project from Seam 2.2/RichFaces 3.3/JBoss5.1/Hibernate3.3 to Seam 2.3/RichFaces 4/Jboss7.1/Hibernate 4.x

       

      So far the migration for Seam, Hibernate, Jboss has not been completely smooth but without major problems. The migration from RichFaces 3.3 to RichFaces 4 seems to be another storry!

       

      The documentation for RichFaces 4 has more holes then a Swiss Cheese compared to the really good documentation for RichFaces 3.3!

      The live demo for 3.3 (http://livedemo.exadel.com/richfaces-demo/index.jsp) had nearly all the info you needed and the rest was in the developer guide. The new live demo has hardly any info (e.g. no tag info). The VDL documentation isn't even included in the distribution and I only found it online: http://docs.jboss.org/richfaces/latest_4_3_X/vdldoc/

       

      Has anyone managed to migrate a large RichFaces 3.3 project to RichFaces 4?

       

       

      DataScroller

      E.g. what happened to the facets for the dataScroller?

      This is how my datascroller looked like. I've used all the different facets:Screen Shot 2013-05-20 at 16.30.24.png

       

      <f:facet name="first">

                        <s:span styleClass="icon icon-resultset_first"/>

              </f:facet>

               <f:facet name="first_disabled">

                  <s:span styleClass="icon icon-resultset_first greyedOut"/>

              </f:facet>

              <f:facet name="fastrewind">

                        <s:span styleClass="icon icon-resultset_previous"/>

              </f:facet>

              <f:facet name="fastrewind_disabled">

                  <s:span styleClass="icon icon-resultset_previous greyedOut"/>

              </f:facet>

              <f:facet name="fastforward">

              <s:span styleClass="icon icon-resultset_next"/>

              </f:facet>

              <f:facet name="fastforward_disabled">

                  <s:span styleClass="icon icon-resultset_next greyedOut"/>

              </f:facet>

              <f:facet name="last">

                        <s:span styleClass="icon icon-resultset_last"/>

              </f:facet>

              <f:facet name="last_disabled">

                  <s:span styleClass="icon icon-resultset_last greyedOut"/>

              </f:facet>

       

      And now it looks like this:Screen Shot 2013-05-20 at 16.30.35.png

      Only the facets for first and last are used and it is left aligned instead of centred (scroller not part of table but using for). And the best: it doesn't event work!

      I've found this: https://community.jboss.org/message/798197 which suggests that there could be a problem with bundling guava. But even if I just use the guave from JBoss I have the same problem.

       

       

      a:ajax vs a:support

      Somehow I've got the feeling RichFace 4 is actually a step back in functionality compared to RichFaces 3. E.g. that you can't have an action method with arguments on a a:support (now a:ajax) anymore.

       

      Do you really have to change all previous a:support action method to a listener method with the AjaxBehaviourEvent?

       

      contextMenu

      Before you could put a rich:component control into e.g. a s:span. That doens't work anymore! I've got a context menu which I reuse in a table. I don't want to open the context menu with a right click but by clicking on an 'action' icon. The menu is showing - but only very briefly before it gets hidden again and it is always shown at the top of the table and not where the actual icon with the component control is. I used to pass in dynamic parameter to the context menu so that e.g. the labels in the menu would change etc.

       

      <rich:menuItem label="{actionStr}" .../>

       


      <rich:componentControl event="click" target="testMenu" operation="show">

                                              <f:param value="#{task.taskId}" name="taskId" />

                                              <f:param value="#{taskGroup.getActionString(task)}" name="actionStr"/>

      </rich:componentControl>

       

      Now it is just displaying {actionStr} instead of the value I pass in.

       

       

      rich:suggestionBox vs rich:autocomplete

      Or on a rich:suggestionBox I was calling a method with the selected object when the user selected an entry from the list:

      <rich:suggestionbox ....>
      <a:support action="#{portSuggestionInstance.portSelected(unLocode,eventName)}" event="onselect" status="#{lookupId}Status" ajaxSingle="true" reRender="#{reRender}" oncomplete="#{onComplete}">
                                          <f:setPropertyActionListener value="#{unLocode}" target="#{locodeField}" />
                                      </a:support>
      </rich:suggentionbox>
      

      I've tried to add a <a:ajax/> to the rich:autocomplete but that didn't work. There doesn't seem to be a action method for the rich:autocomplete either. So how can you call a method and set some parameters passed into the page.

      I can't use the converter in all cases! So sometimes the backing value is just a String with no converter but when the user selects an entry I still have to set an object on the backing bean.