ICEfaces
  1. ICEfaces
  2. ICE-11420

Changing the filename on ace:dynamicResource does not have any effect in Showcase demo

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: EE-4.3.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Showcase IceSoft
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      In the Showcase, changing the name of the file on ace:dynamicResource does not have any effect. The downloaded file (attachment) is always the default one.
      See ICE-10654 which claims the problem to be fixed but it isn't.

      This is even worse if the Mime-Type changes dynamically eg. due to choosen Filetype to download by user. FileName and MimeType values of ace:dynamicResource must be forced reevaluated once the button is pressed in order to get the right values matching to the download at this moment.

      This is quite a heavy bug as it makes ace:dynamicResource more or less useless.


        Activity

        Hide
        Markus Guenther added a comment - - edited

        Found finally a workaround. Do force a ajax render="id of the dynamicResource" or simply @all whenever there might have happened an action to change the filename or mime type within the UI.

        Note: In the Showcase this is done but only with event="valueChange" and this seems not to work there somehow. In my quite similar case it works with @all and no event selector

        Show
        Markus Guenther added a comment - - edited Found finally a workaround. Do force a ajax render="id of the dynamicResource" or simply @all whenever there might have happened an action to change the filename or mime type within the UI. Note: In the Showcase this is done but only with event="valueChange" and this seems not to work there somehow. In my quite similar case it works with @all and no event selector
        Hide
        Arturo Zambrano added a comment -

        r52777: corrected ace:dynamicResource > Advanced demo to correctly update the entered file name

        The ICE-10654 issue was indeed fixed. However, there were some issues with the demo itself.

        First, the ace:textEntry component to change the file name had two ace:ajax tags. Simply having <ace:ajax render=@form" /> is enough to update the value in the server.

        The other issue is that values in a form are not submitted and updated in the server when the ace:dynamicResource type is 'image'. This is simply, because an anchor element is rendered with the image and the URL, so the form is not submitted. In order for the form to be submitted when the ace:dynamicResource component is clicked, the type must be 'button'. So, if an image is to be rendered for this button, it will have to be done via CSS, as shown in the updated demo. The 'image' time should only be for static resources that are not expected to change dynamically.

        Show
        Arturo Zambrano added a comment - r52777: corrected ace:dynamicResource > Advanced demo to correctly update the entered file name The ICE-10654 issue was indeed fixed. However, there were some issues with the demo itself. First, the ace:textEntry component to change the file name had two ace:ajax tags. Simply having <ace:ajax render=@form" /> is enough to update the value in the server. The other issue is that values in a form are not submitted and updated in the server when the ace:dynamicResource type is 'image'. This is simply, because an anchor element is rendered with the image and the URL, so the form is not submitted. In order for the form to be submitted when the ace:dynamicResource component is clicked, the type must be 'button'. So, if an image is to be rendered for this button, it will have to be done via CSS, as shown in the updated demo. The 'image' time should only be for static resources that are not expected to change dynamically.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Markus Guenther
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: