Package javax.faces.context

Examples of javax.faces.context.FacesContext.responseComplete()


        context.renderResponse();
        return;
      }
    }
   
    context.responseComplete();
  }

  public MethodBinding getMethod()
  {
    return (MethodBinding) getProperty(METHOD_KEY);
View Full Code Here


    } catch (IOException e) {
      LOG.error("", e);
      // TODO: may do error handling
      throw new FacesException("Can't redirect to '" + forward + "'");
    }
    facesContext.responseComplete();
  }

}
View Full Code Here

      FileInputStream stream = new FileInputStream(fileName);
      FacesContext facesContext = FacesContext.getCurrentInstance();
      ServletResponse response = (ServletResponse) facesContext.getExternalContext().getResponse();
      response.setContentType("text/plain");
      IOUtils.copy(stream, response.getOutputStream());
      facesContext.responseComplete();
      return null;
  }

  public String updateCategories() {
      boolean update = false;
View Full Code Here

  }

  public String export() throws IOException {
    FacesContext context =  FacesContext.getCurrentInstance();
    ExportUIDataToWorkbookUtil.writeWorkbook(table, "workbook.xls", context);
    context.responseComplete();
    return null;
  }

  public Date getDate() {
    return date;
View Full Code Here

    } catch (IOException e) {
      LOG.error("", e);
      return "error";
    }

    facesContext.responseComplete();
    return null;
  }

  public static class Node {
View Full Code Here

          contentWriter.write("\");");
          contentWriter.endElement(HtmlConstants.SCRIPT);
        }

        writeAjaxResponse(facesContext, content.toString());
        facesContext.responseComplete();

      } catch (IOException e) {
        LOG.error("Exception while processing Ajax", e);
      }
    }
View Full Code Here

        final String message = ResourceManagerUtil.getPropertyNotNull(
            facesContext, "tobago", "tobago.ajax.response.error");

        writeAjaxResponse(facesContext, message);

        facesContext.responseComplete();
      }

    } catch (IOException e) {
      LOG.error("Exception while processing Ajax", e);
    }
View Full Code Here

    } catch (IOException e) {
      LOG.error("", e);
      // TODO: may do error handling
      throw new FacesException("Can't redirect to '" + forward + "'");
    }
    facesContext.responseComplete();
  }

}
View Full Code Here

       
        //Write the table back out
        PrintWriter out = response.getWriter();
        out.print(htmlBuffer);
        out.close();
        fc.responseComplete();
    }   
   
    @SuppressWarnings("static-access")
  public void exportHtmlTableAsExcel() throws IOException{
        int rowCount = 0;
View Full Code Here

       
        //Write out the spreadsheet
        wb.write(out);
        out.close();
       
        fc.responseComplete();
   
     
  public int getNumRows() {
    return numRows;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.