Package org.ajax4jsf.resource

Examples of org.ajax4jsf.resource.FacesResourceContext


      Object response = context.getExternalContext().getResponse();
      if (response instanceof MimeResponse) {
        MimeResponse mimeResponse = (MimeResponse) response;
        ResourceURL resourceURL = PlatformUtil
            .createResourceURL(mimeResponse);
        FacesResourceContext resourceContext = new FacesResourceContext(
            context);
        resourceContext.setResourceData(storeData);
        if (resource.isCacheable(resourceContext)) {
          try {
            // resourceURL.setCacheability(ResourceURL.FULL);
          } catch (IllegalStateException e) {
            // Ignore that, use default cache level.
View Full Code Here


        }
       
        @Override
        public InputStream getInputStream() throws IOException {
          FacesContext facesContext = FacesContext.getCurrentInstance();
          return resource.getResourceAsStream(new FacesResourceContext(facesContext));
        }
      };
    } catch (ResourceNotFoundException e) {
      //ignore
    }
View Full Code Here

  /**
   * Test method for {@link org.ajax4jsf.resource.InternetResourceBase#send(org.ajax4jsf.resource.ResourceContext)}.
   */
  public void testSend() {
    DnDScript resource = new DnDScript();
        ResourceContext context = new FacesResourceContext(facesContext);
        try {
      resource.send(context);
    } catch (IOException e) {
      e.printStackTrace();
      assertTrue("error send style",false);
View Full Code Here

TOP

Related Classes of org.ajax4jsf.resource.FacesResourceContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.