Package org.primefaces.component.column

Examples of org.primefaces.component.column.Column


                writer.startElement("tbody", null);
                writer.startElement("tr", null);
                       
                 for(UIComponent kid : pickList.getChildren()) {
                     if(kid instanceof Column && kid.isRendered()) {
                         Column column = (Column) kid;
                        
                         writer.startElement("td", null);
                         if(column.getStyle() != null) writer.writeAttribute("style", column.getStyle(), null);
                         if(column.getStyleClass() != null) writer.writeAttribute("class", column.getStyleClass(), null);
                        
                         kid.encodeAll(context);
                         writer.endElement("td");
                     }
                 }
View Full Code Here


       
    for(int i = 0; i < tt.getChildCount(); i++) {
            UIComponent kid = tt.getChildren().get(i);
     
      if(kid instanceof Column && kid.isRendered()) {
        Column column = (Column) kid;
                UIComponent header = column.getFacet("header");
                String headerText = column.getHeaderText();
        String columnStyleClass = column.getStyleClass() == null ? TreeTable.COLUMN_CONTENT_WRAPPER : TreeTable.COLUMN_CONTENT_WRAPPER + " " + column.getStyleClass();
                String style = column.getStyle();
                style = (i == 0) ? style == null ? "padding-left:0px" : style + ";padding-left:0px" : style;

        writer.startElement("th", null);
                writer.writeAttribute("id", column.getClientId(context), null);
                writer.writeAttribute("class", TreeTable.COLUMN_HEADER_CLASS, null);

        writer.startElement("div", null);
                writer.writeAttribute("class", columnStyleClass, null);
                if(style != null)
View Full Code Here

            for(int i=0; i < tt.getChildren().size(); i++) {
                UIComponent kid = (UIComponent) tt.getChildren().get(i);

                if(kid instanceof Column && kid.isRendered()) {
                    Column column = (Column) kid;
                    String styleClass = column.getStyleClass() == null ? TreeTable.COLUMN_CONTENT_WRAPPER : TreeTable.COLUMN_CONTENT_WRAPPER + " " + column.getStyleClass();
                    String style = column.getStyle();

                    writer.startElement("td", null);

                    writer.startElement("div", null);
                    writer.writeAttribute("class", styleClass, null);

                    //icon
                    if(i == 0) {
                        String padding = "padding-left:" + (depth * 15) + "px";
                        style = style == null ? padding : style + ";" + padding;

                        writer.writeAttribute("style", style, null);

                        writer.startElement("span", null);
                        writer.writeAttribute("class", icon, null);
                        if(treeNode.getChildCount() == 0) {
                            writer.writeAttribute("style", "visibility:hidden", null);
                        }
                        writer.endElement("span");
                    }
                    else if(style != null) {
                        writer.writeAttribute("style", style, null);
                    }

                    //content
                    column.encodeAll(context);

                    writer.endElement("div");

                    writer.endElement("td");
                }
View Full Code Here

        for(int i = 0; i < tt.getChildCount(); i++) {
            UIComponent kid = tt.getChildren().get(i);
     
      if(kid instanceof Column && kid.isRendered()) {
        Column column = (Column) kid;
                UIComponent footer = column.getFacet("footer");
                String footerText = column.getHeaderText();
               
        String columnStyleClass = column.getStyleClass() == null ? TreeTable.COLUMN_CONTENT_WRAPPER : TreeTable.COLUMN_CONTENT_WRAPPER + " " + column.getStyleClass();
                String style = column.getStyle();
                style = (i == 0) ? style == null ? "padding-left:0px" : style + ";padding-left:0px" : style;

        writer.startElement("td", null);
                writer.writeAttribute("id", column.getClientId(context), null);
                writer.writeAttribute("class", TreeTable.COLUMN_HEADER_CLASS, null);

        writer.startElement("div", null);
                writer.writeAttribute("class", columnStyleClass, null);
                if(style != null)
View Full Code Here

    protected void processColumnFacets(FacesContext context, PhaseId phaseId) {
        setRowKey(null);
       
        for(UIComponent child : getChildren()) {
            if(child instanceof Column && child.isRendered()) {
                Column column = (Column) child;
               
                if(column.getFacetCount() > 0) {
                    for(UIComponent columnFacet : column.getFacets().values()) {
                        if(phaseId == PhaseId.APPLY_REQUEST_VALUES)
                            columnFacet.processDecodes(context);
                        else if (phaseId == PhaseId.PROCESS_VALIDATIONS)
                            columnFacet.processValidators(context);
                        else if (phaseId == PhaseId.UPDATE_MODEL_VALUES)
View Full Code Here

    }

    public boolean hasFooterColumn() {
        for(UIComponent child : getChildren()) {
            if(child instanceof Column && child.isRendered()) {
                Column column = (Column) child;

                if(column.getFacet("footer") != null || column.getFooterText() != null)
                    return true;
            }
        }

        return false;
View Full Code Here

        writer.writeAttribute("class", rowClass, null);
        writer.writeAttribute("role", "row", null);
       
        for(UIComponent child : row.getChildren()) {
            if(child instanceof Column && child.isRendered()) {
                Column column = (Column) child;
                String styleClass = column.getStyleClass();
                styleClass = styleClass == null ? columnClass : columnClass == null ? styleClass : (styleClass + " " + columnClass);
               
                writer.startElement("td", null);
                writer.writeAttribute("role", columnRole, null);
               
                if(column.getStyle() != null) writer.writeAttribute("style", column.getStyle(), null);
                if(styleClass != null) writer.writeAttribute("class", styleClass, null);
                if(column.getColspan() > 1) writer.writeAttribute("colspan", column.getColspan(), null);
                if(column.getRowspan() > 1) writer.writeAttribute("rowspan", column.getRowspan(), null);
               
                column.encodeAll(context);
               
                writer.endElement("td");
            }
         else{
                System.out.println("ELSE");
View Full Code Here

    if(columnSelectionMode == null) {
      for(Iterator<javax.faces.component.UIComponent> children = getChildren().iterator(); children.hasNext();) {
        javax.faces.component.UIComponent kid = children.next();
       
        if(kid.isRendered() && kid instanceof Column) {
          Column column = (Column) kid;
         
          if(column.getSelectionMode() != null) {
            columnSelectionMode = column.getSelectionMode();
          }
        }
      }
    }
   
View Full Code Here

   
    for(Iterator<UIComponent> children = dataTable.getChildren().iterator(); children.hasNext();) {
      UIComponent kid = children.next();
     
      if(kid.isRendered() && kid instanceof Column) {
        Column column = (Column) kid;
       
        if(column.getSelectionMode() == null) {
          writer.write("{key:'" + kid.getId() + "'");
          if(column.getParser() != null)
            writer.write(",parser:'" + column.getParser() + "'");
         
          writer.write("}");
         
          if(children.hasNext())
            writer.write(",");
View Full Code Here

    writer.write("var " + columnDefVar + " = [");
    for(Iterator<UIComponent> children = dataTable.getChildren().iterator(); children.hasNext();) {
      UIComponent kid = children.next();
     
      if(kid.isRendered() && kid instanceof Column) {
        Column column = (Column) kid;
        UIComponent header = column.getFacet("header");
       
        writer.write("{key:'" + column.getId()  + "'");
        if(header != null) {
          writer.write(",label:'");
          if(header.getClass().getName().equals("com.sun.facelets.compiler.UIInstructions")) {    //cant use instanceof
            String instructionsValue = header.toString();
            if(instructionsValue != null)
              writer.write(instructionsValue.trim());
          } else {           
            renderChild(facesContext, column.getFacet("header"));
          }
          writer.write("'");
        }
        else {
          writer.write(",label:''");
        }
       
        if(column.getValueExpression("sortBy") != null) writer.write(",sortable:true");
        if(column.isResizable()) writer.write(",resizeable:true");
        if(column.isFilter()) writer.write(",filter:true");
        if(column.getWidth() != Integer.MIN_VALUE) writer.write(",width:" + column.getWidth());
        if(column.getSelectionMode() != null) {
          String selector = column.getSelectionMode().equals("single") ? "radio" : "checkbox";
         
          writer.write(",formatter:'" + selector + "'");
        }
       
        writer.write("}");
View Full Code Here

TOP

Related Classes of org.primefaces.component.column.Column

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.