ICEfaces
  1. ICEfaces
  2. ICE-7423

MyFaces 2: compatibility with ACE

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta2
    • Fix Version/s: 3.0.RC1, 3.0
    • Labels:
      None
    • Environment:
      ICEfaces 2 ACE MyFaces 2
    • Assignee Priority:
      P1
    • Affects:
      Sample App./Tutorial, Compatibility/Configuration

      Description

      As part of the effort to provide full compatibility with MyFaces 2, we need to ensure that it works with all of our ACE components. Getting the ACE Comp Suite to fully run on the MyFaces 2 implementation is the goal.

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          MyFaces UIData getDataModel() and getValue() interact with each other very differently from mojarra, apparently complicating the filtering implementation. Additional investigation is required.

          Show
          Ted Goddard added a comment - MyFaces UIData getDataModel() and getValue() interact with each other very differently from mojarra, apparently complicating the filtering implementation. Additional investigation is required.
          Hide
          Ted Goddard added a comment -

          With MyFaces, DataTable.getValue() is only called at the beginning of the Lifecycle, and not after filtering has been performed.

          Implementing more of UIData similar to mojarra appears to work:

          @Override
          protected DataModel getDataModel() {

          • Object value = this.getValue();

          + if (this.model != null)

          { + return (model); + }

          +
          // If existing tree check for changes or return cached model
          if (hasTreeDataModel() || newTreeDataModel)

          { - if (newTreeDataModel) treeModel = new TreeDataModel((List)value); - newTreeDataModel = false; - return treeModel; + Object value = this.getValue(); + if (newTreeDataModel) treeModel = new TreeDataModel((List)value); + newTreeDataModel = false; + return treeModel; }
          • return super.getDataModel();
            + Object current = getValue();
            + if (current == null) { + setDataModel(new ListDataModel(Collections.EMPTY_LIST)); + }

            else if (current instanceof DataModel)

            { + setDataModel((DataModel) current); + }

            else if (current instanceof List)

            { + setDataModel(new ListDataModel((List) current)); + }

            else if (Object[].class.isAssignableFrom(current.getClass()))

            { + setDataModel(new ArrayDataModel((Object[]) current)); + }

            else if (current instanceof ResultSet)

            { + setDataModel(new ResultSetDataModel((ResultSet) current)); +// }

            else if (current instanceof Result)

            { +// setDataModel(new ResultDataModel((Result) current)); + }

            else

            { + setDataModel(new ScalarDataModel(current)); + }

            +
            + return model;
            }

          + private DataModel model;
          @Override
          + protected void setDataModel(DataModel dataModel)

          { + this.model = dataModel; + }

          +

          This may introduce other side effects, however.

          Show
          Ted Goddard added a comment - With MyFaces, DataTable.getValue() is only called at the beginning of the Lifecycle, and not after filtering has been performed. Implementing more of UIData similar to mojarra appears to work: @Override protected DataModel getDataModel() { Object value = this.getValue(); + if (this.model != null) { + return (model); + } + // If existing tree check for changes or return cached model if (hasTreeDataModel() || newTreeDataModel) { - if (newTreeDataModel) treeModel = new TreeDataModel((List)value); - newTreeDataModel = false; - return treeModel; + Object value = this.getValue(); + if (newTreeDataModel) treeModel = new TreeDataModel((List)value); + newTreeDataModel = false; + return treeModel; } return super.getDataModel(); + Object current = getValue(); + if (current == null) { + setDataModel(new ListDataModel(Collections.EMPTY_LIST)); + } else if (current instanceof DataModel) { + setDataModel((DataModel) current); + } else if (current instanceof List) { + setDataModel(new ListDataModel((List) current)); + } else if (Object[].class.isAssignableFrom(current.getClass())) { + setDataModel(new ArrayDataModel((Object[]) current)); + } else if (current instanceof ResultSet) { + setDataModel(new ResultSetDataModel((ResultSet) current)); +// } else if (current instanceof Result) { +// setDataModel(new ResultDataModel((Result) current)); + } else { + setDataModel(new ScalarDataModel(current)); + } + + return model; } + private DataModel model; @Override + protected void setDataModel(DataModel dataModel) { + this.model = dataModel; + } + This may introduce other side effects, however.
          Hide
          Ted Goddard added a comment -

          The update problem on the tabSetProxy page is now fixed. The h:messages was within a <div> but no ID was present, so the update would propagate out when the messages were dynamically modified. MyFaces does not wrap messages with an ID by default. (This case is complicated by the JavaScript state of the tab component – other components can typically handle a larger-than-necessary DOM update.)

          Show
          Ted Goddard added a comment - The update problem on the tabSetProxy page is now fixed. The h:messages was within a <div> but no ID was present, so the update would propagate out when the messages were dynamically modified. MyFaces does not wrap messages with an ID by default. (This case is complicated by the JavaScript state of the tab component – other components can typically handle a larger-than-necessary DOM update.)
          Hide
          Deryk Sinotte added a comment -

          There is a ticket for the h:message(s) issue with ICEfaces open in both our system (ICE-6622) and the MyFaces system (https://issues.apache.org/jira/browse/MYFACES-3272) but it doesn't appear that they plan to do anything about it so we'll likely still need to do something ourselves.

          Show
          Deryk Sinotte added a comment - There is a ticket for the h:message(s) issue with ICEfaces open in both our system ( ICE-6622 ) and the MyFaces system ( https://issues.apache.org/jira/browse/MYFACES-3272 ) but it doesn't appear that they plan to do anything about it so we'll likely still need to do something ourselves.
          Hide
          Deryk Sinotte added a comment -

          Marking as resolved. It looks like the remaining issues are general issues with the application or other areas and not specifically related to MyFaces. The following outstanding issues occur with both MyFaces and Mojarra.

          Confirmation Dialog: Changing the Header or Message values results in double buttons being rendered until next edit.

          Data Exporter: Specifying columns doesn't appear to work. Looks like Ant build may not include all necessary libraries.

          Date Entry: Ajax Submit

          Appears functional but logs this to the server console the first time Ajax Submit is selected (depending on JSF implementation)

          21-Nov-2011 11:06:05 AM org.apache.myfaces.view.facelets.tag.MetaRulesetImpl finish
          SEVERE: /resources/examples/ace/date/dateajax.xhtml at line 48 and column 52 update="selectedPop" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior
          21-Nov-2011 11:06:05 AM org.apache.myfaces.view.facelets.tag.MetaRulesetImpl finish
          SEVERE: /resources/examples/ace/date/dateajax.xhtml at line 64 and column 51 update="selectedIn" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior

          21-Nov-2011 11:07:52 AM com.sun.faces.facelets.tag.MetaRulesetImpl finish
          SEVERE: /resources/examples/ace/date/dateajax.xhtml @48,52 update="selectedPop" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior
          21-Nov-2011 11:07:52 AM com.sun.faces.facelets.tag.MetaRulesetImpl finish
          SEVERE: /resources/examples/ace/date/dateajax.xhtml @64,51 update="selectedIn" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior

          Drag Drop: Turning on Clone Helper mode appears to do some strange things.

          Notification Panel: The state of the button does not revert from "Hide" back to "Show" if you close the panel using the close icon.

          Slider: Asynchronous doesn't work. Setting options can cause slider rail to disappear.

          Show
          Deryk Sinotte added a comment - Marking as resolved. It looks like the remaining issues are general issues with the application or other areas and not specifically related to MyFaces. The following outstanding issues occur with both MyFaces and Mojarra. Confirmation Dialog: Changing the Header or Message values results in double buttons being rendered until next edit. Data Exporter: Specifying columns doesn't appear to work. Looks like Ant build may not include all necessary libraries. Date Entry: Ajax Submit Appears functional but logs this to the server console the first time Ajax Submit is selected (depending on JSF implementation) 21-Nov-2011 11:06:05 AM org.apache.myfaces.view.facelets.tag.MetaRulesetImpl finish SEVERE: /resources/examples/ace/date/dateajax.xhtml at line 48 and column 52 update="selectedPop" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior 21-Nov-2011 11:06:05 AM org.apache.myfaces.view.facelets.tag.MetaRulesetImpl finish SEVERE: /resources/examples/ace/date/dateajax.xhtml at line 64 and column 51 update="selectedIn" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior 21-Nov-2011 11:07:52 AM com.sun.faces.facelets.tag.MetaRulesetImpl finish SEVERE: /resources/examples/ace/date/dateajax.xhtml @48,52 update="selectedPop" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior 21-Nov-2011 11:07:52 AM com.sun.faces.facelets.tag.MetaRulesetImpl finish SEVERE: /resources/examples/ace/date/dateajax.xhtml @64,51 update="selectedIn" Unhandled by MetaTagHandler for type org.icefaces.ace.component.ajax.AjaxBehavior Drag Drop: Turning on Clone Helper mode appears to do some strange things. Notification Panel: The state of the button does not revert from "Hide" back to "Show" if you close the panel using the close icon. Slider: Asynchronous doesn't work. Setting options can cause slider rail to disappear.

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: