5 Replies Latest reply on Aug 27, 2012 1:44 AM by Christian Peter

    JSF 2.2 and java.util.Sets

    Andrew Wheeler Newbie

      Is there any planning around readying RichFaces for JSF 2.2? I took a milestone release for Mojarra and upgraded the JSF libs on JBoss 7.1. Sadly Richfaces causes my application to fail. It appears there are some improvements around UIComponent that are not backwards compatible. JSF components now implement pass through attributes which is not handled by Richfaces.


      If you're wondering why I want to move to JSF2.2 it is because it now handles Set data models. In the mean time I will use an earlier snapshot of JSF2.2 that doesn't have this backwards compatibility break and continue to use Sets!


      If anyone is interested here is my sleuthing:


      Exception thrown

      Caused by: java.lang.AbstractMethodError

          at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startElement(HtmlResponseWriter.java:635) [jsf-impl-2.2.0-m05.jar:2.2.0-m05-SNAPSHOT]

          at com.sun.faces.renderkit.html_basic.ScriptRenderer.startElement(ScriptRenderer.java:60) [jsf-impl-2.2.0-m05.jar:2.2.0-m05-SNAPSHOT]

          at com.sun.faces.renderkit.html_basic.ScriptRenderer.encodeEnd(ScriptRenderer.java:106) [jsf-impl-2.2.0-m05.jar:2.2.0-m05-SNAPSHOT]

          at org.richfaces.component.UITransient.encodeEnd(UITransient.java:236) [richfaces-core-impl-4.2.2.Final.jar:4.2.2.Final]

      Mojarra implementation

          public void startElement(String name, UIComponent componentForElement)
                throws IOException {
              if (name == null) {
                  throw new NullPointerException(MessageUtils.getExceptionMessageString(
                        MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "name"));
              scriptOrStyleSrc = false;
              if ("cdata".equalsIgnoreCase(name)) {
                  isCdata = true;
              } else if (writingCdata) {
                  // starting an element within a cdata section,
                  // keep escaping disabled
                  isCdata = false;
                  writingCdata = true;
              if (null != componentForElement) {
                  Map passThroughAttrs = componentForElement.getPassThroughAttributes(false);
                  if (null != passThroughAttrs && !passThroughAttrs.isEmpty()) {
              closeStart = true;