Uploaded image for project: 'Portlet Bridge'
  1. Portlet Bridge
  2. PBR-320

response.createResourceURL() broken from PBR-307

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.3.0.FINAL
    • Fix Version/s: 2.3.1.Final
    • Component/s: None
    • Labels:
      None

      Description

      The solution from PBR-307 would break the createResourceURL function (create a resourceURL pointing back to same portlet for a serveResourceRequest):

      the following (works with 2.2.0.Final) now throws org.ajax4jsf.resource.ResourceNotFoundException: Static resource not found for path http://localhost:8080/apo2/index.jsp?windowstate=normal&resourcestate=JBPNS_&type=portlet&resourceid=%2Fspimage%2F123&resourcecacheability=PAGE&phase=resource&windowid=...

      backingbean.java
      static public String createResURL(String key) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        String url;
        MimeResponse response = (MimeResponse) facesContext.getExternalContext().getResponse();
        ResourceURL resourceURL = response.createResourceURL();
        resourceURL.setResourceID(key);
        url = resourceURL.toString();
        return url;
      }
      
      facelet.xhtml
        <h:graphicImage value="#{backingbean.createResURL('/spimage/123'}"/>
      

      additional, now it's impossible to get static-urls (cacheable for browsers) to images/css/....
      or is there still a way to get the old (v2.2.0) behaviour?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kenfinni Ken Finnigan
                Reporter:
                nias Markus Schulz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: