Package javax.faces.component

Examples of javax.faces.component.UIColumn


            {
                //This code corrects MYFACES-1790, because HtmlColumnTag
                //has as component type javax.faces.Column, so as side
                //effect it not create HtmlColumn, it create UIColumn
                //classes.
                UIColumn column = (UIColumn) uiComponent;               
                if (isHeader)
                {
                    String headerClass = (String) column.getAttributes().get("headerClass");
                    if (headerClass != null)
                    {
                        styleClass = (String) headerClass;
                    }
                }
                else
                {
                    String footerClass = (String) column.getAttributes().get("footerClass");
                    if (footerClass != null)
                    {
                        styleClass = (String) footerClass;
                    }
                }
View Full Code Here


            while(parent != null && !((parent=parent.getParent())instanceof UIColumn));

            if(parent != null)
            {
                UIColumn column = (UIColumn) parent;

                if(column.getHeader()!=null)
                {
                    UIComponent header = column.getHeader();

                    return getComponentText(facesContext, header);
                }
            }
        }
View Full Code Here

        writer = null;
    }

    public void testRenderTable() throws Exception
    {
        UIColumn col1 = new UIColumn();
        HtmlOutputText col1Text = new HtmlOutputText();
        col1Text.setValue("col1Text");

        UIColumn col2 = new UIColumn();
        HtmlOutputText col2Text = new HtmlOutputText();
        col2Text.setValue("col2Text");

        col1.getChildren().add(col1Text);
        col2.getChildren().add(col2Text);
        panelGrid.getChildren().add(col1);
        panelGrid.getChildren().add(col2);

        panelGrid.encodeBegin(facesContext);
        panelGrid.encodeChildren(facesContext);
View Full Code Here

       
        dataTable.setId("data");
        dataTable.setRowClasses("class1, class2");
        dataTable.setVar("person");
       
        UIColumn column1 = new UIColumn();
        HtmlOutputText text = new HtmlOutputText();
        text.setValueExpression("value",
                facesContext.getApplication().getExpressionFactory().createValueExpression(
                        facesContext.getELContext(), "#{person.firstName}", String.class));
        column1.getChildren().add(text);
       
        dataTable.getChildren().add(column1);
        UIColumn column2 = new UIColumn();
        HtmlOutputText text2 = new HtmlOutputText();
        text2.setValueExpression("value",
                facesContext.getApplication().getExpressionFactory().createValueExpression(
                        facesContext.getELContext(), "#{person.lastName}", String.class));
        column2.getChildren().add(text2);
        dataTable.getChildren().add(column2);

        dataTable.setValue(new UnknownRowCountDemoDataModel<Person>(list));

        String output1 = null;
View Full Code Here

        int newspaperColumns = newspaperTable.getNewspaperColumns();
        for(int nc = 0; nc < newspaperColumns; nc++) {
            for(Iterator it = newspaperTable.getChildren().iterator(); it.hasNext(); ) {
                UIComponent uiComponent = (UIComponent)it.next();
                if(!(uiComponent instanceof UIColumn)) continue;
                UIColumn column = (UIColumn)uiComponent;
                if(!column.isRendered()) continue;
                // get the component to render
                UIComponent facet = null;
                if(header) facet = column.getHeader();
                else facet = column.getFooter();
                // do the rendering of the cells
                renderColumnHeaderOrFooterCell(facesContext, writer, column, styleClass, facet);
            }

            // draw the spacer facet
View Full Code Here

     */
    protected boolean hasFacet(boolean header, UIComponent uiComponent)
    {
        if (uiComponent instanceof UIColumn)
        {
            UIColumn uiColumn = (UIColumn) uiComponent;
            return header ? uiColumn.getHeader() != null : uiColumn.getFooter() != null;
        }
        return false;
    }
View Full Code Here

    this.first = first;
  }

  public void updateSortState(SortActionEvent sortEvent) {

    UIColumn actualColumn = sortEvent.getColumn();

    if (actualColumn.getId().equals(sortedColumnId)) {
      ascending = !ascending;
    } else {
      ascending = true;
      sortedColumnId = actualColumn.getId();
    }
  }
View Full Code Here

    if (currentWidthList == null) {
      LayoutTokens tokens = data.getColumnLayout();
      List<UIColumn> allColumns = data.getAllColumns();
      LayoutTokens newTokens = new LayoutTokens();
      for (int i = 0; i < allColumns.size(); i++) {
        UIColumn column = allColumns.get(i);
        if (column.isRendered()) {
          if (tokens == null) {
            if (column instanceof AbstractUIColumn && ((AbstractUIColumn) column).getWidth() != null) {
              newTokens.addToken(LayoutTokens.parseToken(((AbstractUIColumn) column).getWidth()));
            } else {
              newTokens.addToken(RelativeLayoutToken.DEFAULT_INSTANCE);
View Full Code Here

     */
    protected boolean hasFacet(boolean header, UIComponent uiComponent)
    {
        if (uiComponent instanceof UIColumn)
        {
            UIColumn uiColumn = (UIColumn) uiComponent;
            return header ? uiColumn.getHeader() != null : uiColumn.getFooter() != null;
        }
        return false;
    }
View Full Code Here

            }else{
                //This code corrects MYFACES-1790, because HtmlColumnTag
                //has as component type javax.faces.Column, so as side
                //effect it not create HtmlColumn, it create UIColumn
                //classes.
                UIColumn column = (UIColumn) uiComponent;               
                if (isHeader){
                    String headerClass = (String) column.getAttributes().get("headerClass");
                    if (headerClass != null){
                        styleClass = (String) headerClass;
                    }
                }else{
                    String footerClass = (String) column.getAttributes().get("footerClass");
                    if (footerClass != null){
                        styleClass = (String) footerClass;
                    }
                }
            }
View Full Code Here

TOP

Related Classes of javax.faces.component.UIColumn

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.