ICEfaces
  1. ICEfaces
  2. ICE-7809

UISeriesBase uses Mojarra-specific setDataModel() incompatible with MyFaces

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.BETA
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      n/a

      Description

      The UISeriesBase which the ICEfaces HtmlDataTable and UISeries inherit from, uses the following code which appears to be Mojarra-specific:

      if (isNestedWithinUIData()) {
            setDataModel(null);
      }

      setDataModel() appears to be called if the component is nested within another UIData component. When run with MyFaces (tested with 2.1.6), the following error is generated:

      <error>
          <error-name>java.lang.UnsupportedOperationException</error-name>
          <error-message><![CDATA[this method is here only to maintain binary compatibility w/ the RI]]></error-message>
      </error>

      This error appears to originate from the MyFaces UIData component:

      protected void setDataModel(DataModel dataModel){
              throw new UnsupportedOperationException("this method is here only to maintain binary compatibility w/ the RI");
      }

       

        Issue Links

          Activity

          Hide
          Mark Collette added a comment -

          Reproduced by add an h:commandButton into the ice:columns component in the showcase ice:columns example, so that the h:commandButton showed in every cell of the dataTable. Clicking on the h:commandButton resulted in a server error popup with little information, with nothing in the server log. Use of Firebug to examine the POST response showed the exception type and message.

          Inspection of UISeriesBase.java source code showed that setDataModel(DataModel) was only used in one place, as every other set/null of the DataModel was through the local dataModel field, which supercedes the super-class' DataModel. Likely the sole setDataModel(DataModel) use, introduced by ICE-7142, was an ommission of converting to use of the local field. For some reason, while UISeriesBase.getDataModel() is overridden to use the local field, setDataModel was not overridden at all. So to fix this, I normalised on accessing the local field, and added the local setter, to avoid affecting the unused super-class state.

          icefaces3 trunk
          Subversion 28144

          icefaces-3.0.x-maintenance
          Subversion 28145

          Show
          Mark Collette added a comment - Reproduced by add an h:commandButton into the ice:columns component in the showcase ice:columns example, so that the h:commandButton showed in every cell of the dataTable. Clicking on the h:commandButton resulted in a server error popup with little information, with nothing in the server log. Use of Firebug to examine the POST response showed the exception type and message. Inspection of UISeriesBase.java source code showed that setDataModel(DataModel) was only used in one place, as every other set/null of the DataModel was through the local dataModel field, which supercedes the super-class' DataModel. Likely the sole setDataModel(DataModel) use, introduced by ICE-7142 , was an ommission of converting to use of the local field. For some reason, while UISeriesBase.getDataModel() is overridden to use the local field, setDataModel was not overridden at all. So to fix this, I normalised on accessing the local field, and added the local setter, to avoid affecting the unused super-class state. icefaces3 trunk Subversion 28144 icefaces-3.0.x-maintenance Subversion 28145

            People

            • Assignee:
              Mark Collette
              Reporter:
              Philip Breau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: