Ejemplo n.º 1
0
 protected void processColumnHeader(
     FacesContext fc, OutputTypeHandler outputHandler, UIComponent uiColumn, int colIndex) {
   UIComponent headerComp = uiColumn.getFacet("header");
   if (headerComp != null) {
     String headerText = encodeParentAndChildrenAsString(fc, headerComp);
     if (headerText != null) {
       outputHandler.writeHeaderCell(headerText, colIndex);
     }
   }
 }
Ejemplo n.º 2
0
 protected void processColumnFooter(
     FacesContext fc,
     OutputTypeHandler outputHandler,
     UIComponent uiColumn,
     int colIndex,
     int countOfRowsDisplayed) {
   UIComponent footerComp = uiColumn.getFacet("footer");
   if (footerComp != null) {
     Object output = encodeParentAndChildrenAsString(fc, footerComp);
     if (output != null) {
       outputHandler.writeFooterCell(output, colIndex, countOfRowsDisplayed);
     }
   }
 }
  public static UIComponent findFacet(
      FacesContext context, ServletRequest req, UIComponent parent, String facetName)
      throws Exception {
    if (context == null) FacesContext.getCurrentInstance();

    if (parent == null) {
      UIComponentClassicTagBase parentTag =
          (UIComponentClassicTagBase) req.getAttribute("caucho.jsf.parent");

      parent = parentTag.getComponentInstance();
    }

    if (parent != null) return parent.getFacet(facetName);
    else return null;
  }