aspose file tools*
The moose likes JSF and the fly likes Is anyone using RichFaces 4? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Is anyone using RichFaces 4?" Watch "Is anyone using RichFaces 4?" New topic
Author

Is anyone using RichFaces 4?

Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2861
    
  11

I'm upgrading an application from RichFaces 3.3.1 to RichFaces 4 and it's been a very frustrating experience. It's very poorly documented compared with RichFaces 3.3.x so that's making it harder. They've added some controls, but taken away others. In the ones they've kept, they've changed some attributes either in name or functionality, and in cases neglected to document these changes.

The thing that's killing me though is the rich:extendedDataTable, which is a control we were using extensively. The "upgrade" seems to have removed large amounts of functionality like column grouping and made things like sorting much harder to implement. I can't tell if I'm just not finding the right path through the meager documentation, or if the Richfaces 4 team has really messed this up. I may have to eat crow and convince my company to back off this upgrade. That's going to tough since I was the primary proponent of it.
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
Hi Greg, the best I can suggest is to take a look at what's going into 4.1, it's scheduled for 22-Nov and they're
taking votes (from the richfaces jira) for what's going into the milestone 3 release. No doubt it'll be a bit of a
pain to have to trawl through the issues finding which existing ones correspond to your own problems, but the
more votes, the more chance of getting things fixed. I'm taking a hit right now without pickList & contextMenu,
pickList having been confirmed for 4.1. I had problems with popupMenu but this was something that I was
very easily able to just transition to a jQuery only solution, and it works great. I've written an autocomplete
custom component because the existing 4.0 solution doesn't have pojo support (i.e. you can just deal with
strings rather than more complex objects, the rich:column support doesn't work). I couldn't get inplaceSelect
working either so there are a good few issues I'm hoping to see fixed in 4.1.

A strategy I'd like to develop is using jQuery plugins for the client side solution with a4j:jsFunction for
communication with the server. I'm just looking at what would need to be done to put a pickList solution
together with jQuery. I expect this will lead to messier code but as long as it works, and remains working I
don't care.

http://community.jboss.org/thread/165592

Best of luck,
Brendan.
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2861
    
  11

Thanks Brendan, that's by far the most helpful answer I've received anywhere on RF4 questions. We don't have a jQuery expert on our team, so we're talking about dropping down to RF 3.3.3 and keep an eye on RichFaces 4 to see if they re-implement some of the things they lost. I'm a bit upset with the RichFaces team though. I know it's open source and free, but they still could have been much more complete in documenting what functionality had not made it into the "final" release. That would have saved me some time ... and hair!
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
I understand your concerns. Don't blame yourself too much, the problems that you are
experiencing are widely felt. The thing that kills me is a loss of contunuity, I can leave
the righteous path of progress to work around a bug, and the next thing I know it's
eight weeks later and I've not really moved ahead.

Brendan.
don Hedman
Greenhorn

Joined: Dec 13, 2011
Posts: 1
Brendan, I share the frustration with how RF4 is poorly documented and how we have lost functionality (so it seems) with some of the components. You mention autocomplete here (which I am also struggling with) and perhaps a workaround? Here is what I have working in RF3 with suggestionBox:

<a4j:region>
<h:inputText id="masterNameSearch" value="#{preferredListBean.masterPartyBean.businessName}" size="70" maxlength="70" disabled="#{disabled}"
rendered="#{preferredListBean.listType.code != 'BUS'}"/>
<rich:suggestionbox for="masterNameSearch" var="result" rows="10" minChars="3" width="400"
suggestionAction="#{preferredListBean.autocompleteMasterName}"
rendered="#{preferredListBean.listType.code != 'BUS'}" eventsQueue="ajaxEventQueue">
<h:column>
<h: outputText value="#{result.description}" styleClass="standard-10font" />
</h:column>
<a4j:support event="onselect" eventsQueue="ajaxEventQueue" action="#{managePreferredListBean.retrieveMasterParty(result)}"
reRender="masterNameSearch,masterPanelDetails,addButtonPanel,duplicateAdd" oncomplete="enableAddButton();" />
</rich:suggestionbox>
</a4j:region>

I have managed to refactor this as follows in RF4:

<h:inputText id="masterNameSearch" value="#{preferredListBean.masterPartyBean.businessName}"
size="70" maxlength="70" disabled="#{disabled}"
rendered="#{preferredListBean.listType.code != 'BUS'}"/>
<rich:autocomplete var="result" rows="10" minChars="3" width="400"
autocompleteMethod="#{preferredListBean.autocompleteMasterName}"
value="#{result.description}" size="200"
render="masterNameSearch,masterPanelDetails,addButtonPanel,duplicateAdd"
suggestionAction="#{managePreferredListBean.retrieveMasterParty(result)}"
complete="enableAddButton();"
rendered="#{preferredListBean.listType.code != 'BUS'}" />

I cannot figure out how to fire the function "managePreferredListBean.retrieveMasterParty(result)" when a choice is made from the suggestions nor can I figure out how to increase the width of the autocomplete box (width=400 isn't working).

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is anyone using RichFaces 4?