0

Our team is finally migrating from RichFaces 3.3.3. I've chosen the latest (and final) RichFaces 4.5.14 (with JSF 2.2/Mojarra 2.2.0). While many methods will also undoubtedly be altered, the replacement for SimpleSelection is my current headache.

import org.richfaces.model.selection.SimpleSelection;
private SimpleSelection selection = null;
public void setSelection(SimpleSelection selection) {
    this.selection = selection;
}
  • What is the deprecated SimpleSelection method's replacement?
  • At a higher level, what have other developers done to replace complex UI components without having to rewrite code significantly?

Yes, I've looked at many other SO articles on RichFaces Migration (such as this one) , and have been following the (woefully incomplete) RichFaces 3.3.x - 4.x Migration Guide, which was last updated on 31 January 2013. I've also searched the latest documentation and Showcase Demo.

Community
  • 1
  • 1
MAbraham1
  • 1,717
  • 4
  • 28
  • 45
  • 1
    You don't it in RichFaces 4.5. Use ` private Collection yourObjectSelection` instead. – Vasil Lukach Mar 07 '16 at 18:07
  • 1
    FYI: https://developer.jboss.org/people/michpetrov/blog/2016/02/12/the-future-of-richfaces – BalusC Mar 07 '16 at 19:08
  • @BalusC, yes I linked to that announcement also. This first migration is meant to work for IE-11 compatibility-mode on. The next migration will likely be an overhaul as we switch to something supported. Do you still recommend PrimeFaces or something else? – MAbraham1 Mar 07 '16 at 19:19
  • @VasilLukach, could you provide an example? – MAbraham1 Mar 07 '16 at 19:20
  • 1
    Oh, didn't notice the first link (visited links appear as very dark blue and goes almost unnoticed). PrimeFaces does a good job. – BalusC Mar 07 '16 at 19:25
  • @BalusC, I know you're also a big proponent of OmniFaces. Is there a better migration path for either from RichFaces? Thanks! – MAbraham1 Mar 07 '16 at 19:44
  • 1
    I created OmniFaces myself. It isn't exactly a component library. It's an utility library which can be used together with any component library. See also http://omnifaces.org homepage. – BalusC Mar 07 '16 at 19:45
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/105600/discussion-between-mabraham1-and-balusc). – MAbraham1 Mar 07 '16 at 20:03
  • 1
    Good example is [on RichFaces showcase](http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=extendedDataTable&sample=exTableSelection&skin=blueSky). See Selection Management tab (source code). I can provide my example, but describe your use case. – Vasil Lukach Mar 07 '16 at 20:16
  • Thanks, @VasilLukach – MAbraham1 Mar 08 '16 at 20:00
  • Would someone write an answer so that I may select it? @VasilLukach – MAbraham1 Mar 09 '16 at 21:17

1 Answers1

1

SimpleSelection in RichFaces 4.x was replaced with collection of selected objects:

private Collection<Object> yourObjectSelection;

Example of using selection is on RichFaces showcase page.

Vasil Lukach
  • 3,658
  • 3
  • 31
  • 40