ICEfaces
  1. ICEfaces
  2. ICE-7713

Improve strategy for behaviour of ace:fileEntry component in portlets.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.1.0.BETA1, 3.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 3 portal portlet File Entry
    • Assignee Priority:
      P2

      Description

      For case http://jira.icefaces.org/browse/ICE-7684, we fixed the behaviour of the ace:fileEntry component by adjusting the FileEntryPhaseListener to set the wrapped request in two places of the PortletFaces Bridge code. However, we should revisit this change and look at the behaviour of BridgeSetup$NonTransientJavascriptResourceOutput:

              public void restoreState(FacesContext context, Object state) {
                  //call method from super-class to restore the component attributes first
                  super.restoreState(context, state);
                  Map attributes = getAttributes();
                  String name = (String) attributes.get("name");
                  String library = (String) attributes.get("library");
                  String version = (String) attributes.get("version");

                  ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
      --> Resource r = resourceHandler.createResource(name, fixResourceParameter(library));
                  String path = r.getRequestPath();
                  if (version == null) {
                      script = path;
                  } else {
                      if (path.contains("?")) {
                          script = path + "&v=" + version;
                      } else {
                          script = path + "?v=" + version;
                      }
                  }
              }

      as well as the result in the bridge itself to see if we are doing the right thing.

        Issue Links

          Activity

          Hide
          Deryk Sinotte added a comment -

          As per ICE-7684, it looks like Mircea has removed the call to createResource that was causing the issue so we should remove the original fix and retest.

          Show
          Deryk Sinotte added a comment - As per ICE-7684 , it looks like Mircea has removed the call to createResource that was causing the issue so we should remove the original fix and retest.
          Hide
          Deryk Sinotte added a comment -

          The removal of the call was actually done in ICE-7728 but the original issue was reported and temporarily fixed in ICE-7684.

          Show
          Deryk Sinotte added a comment - The removal of the call was actually done in ICE-7728 but the original issue was reported and temporarily fixed in ICE-7684 .
          Hide
          Deryk Sinotte added a comment -

          I removed the original workaround in the FileEntryPhaseListener and retested in Liferay. The component works and updates the relevant info when a file is uploaded. So I've committed this change and resolving as fixed.

          Show
          Deryk Sinotte added a comment - I removed the original workaround in the FileEntryPhaseListener and retested in Liferay. The component works and updates the relevant info when a file is uploaded. So I've committed this change and resolving as fixed.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: