Package javax.faces.component

Examples of javax.faces.component.UIColumn


    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


      LayoutToken token = tokens.get(i);
      if (token instanceof AutoLayoutToken) {
        int width = 0;
        if (!rendereredColumns.isEmpty()) {
          if (i < rendereredColumns.size()) {
            UIColumn column = rendereredColumns.get(i);
            if (column instanceof AbstractUIColumnSelector) {
              width = 20; // FIXME: make dynamic (was removed by changing the layout
              LOG.error("20; // FIXME: make dynamic (was removed by changing the layout");

            } else {
              for (UIComponent component : (List<UIComponent>) column.getChildren()) {
                width += 100; // FIXME: make dynamic (was removed by changing the layout
                LOG.error("100; // FIXME: make dynamic (was removed by changing the layout");
              }
            }
            layoutInfo.update(width, i);
View Full Code Here

    protected void processColumnFacets(FacesContext context, PhaseId phaseId) {
        setRowKey(null);
       
        for(UIComponent child : getChildren()) {
            if(child instanceof UIColumn && child.isRendered()) {
                UIColumn column = (UIColumn) 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

  protected List<UIColumn> getColumnsToExport(UIData table) {
        List<UIColumn> columns = new ArrayList<UIColumn>();

        for(UIComponent child : table.getChildren()) {
            if(child instanceof UIColumn) {
                UIColumn column = (UIColumn) child;

                columns.add(column);
            }
        }
View Full Code Here

      LayoutTokens tokens = getColumnLayout();
      List<UIColumn> allColumns = getAllColumns();
      LayoutTokens newTokens = new LayoutTokens();
      if (allColumns.size() > 0) {
        for (int i = 0; i < allColumns.size(); i++) {
          UIColumn column = allColumns.get(i);
          if (column.isRendered()) {
            if (tokens == null) {
              if (column instanceof org.apache.myfaces.tobago.component.UIColumn) {
                newTokens.addToken(
                    LayoutTokens.parseToken(((org.apache.myfaces.tobago.component.UIColumn) column).getWidth()));
              } else {
View Full Code Here

      LayoutToken token = tokens.get(i);
      if (token instanceof FixedLayoutToken) {
        int width = 0;
        if (!rendereredColumns.isEmpty()) {
          if (i < rendereredColumns.size()) {
            UIColumn column = rendereredColumns.get(i);
            if (column instanceof UIColumnSelector) {
              LayoutInformationProvider renderer
                  = ComponentUtil.getRenderer(facesContext, column);
              if (renderer == null) {
                LOG.warn("can't find renderer for " + column.getClass().getName());
                renderer = ComponentUtil.getRenderer(facesContext, UIPanel.COMPONENT_FAMILY, RENDERER_TYPE_OUT);
              }
              width = renderer.getFixedWidth(facesContext, column);

            } else {
              for (UIComponent component : (List<UIComponent>) column.getChildren()) {
                LayoutInformationProvider renderer
                    = ComponentUtil.getRenderer(facesContext, component);
                width += renderer.getFixedWidth(facesContext, component);
              }
            }
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

    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

  public void testProcessActionWithUIData() {

    UIData dataTable = new UIData();
    dataTable.setValue(dataModel);
    UIColumn column = new UIColumn();
    UICommand commandButton = new UICommand();
    column.getChildren().add(commandButton);
    dataTable.getChildren().add(column);
    viewToTest.getChildren().add(dataTable);
    dataTable.setRowIndex(1);

    ActionEvent event = new ActionEvent(commandButton);
View Full Code Here

{
  if (!(component instanceof UIColumn))
  {
    throw new IllegalArgumentException("Component " + component.getClass().getName() + " is no UIColumn");
  }
  UIColumn comp = (UIColumn)component;

  super.setProperties(component);

  if (_headerClass != null)
  {
    comp.setValueExpression("headerClass", _headerClass);
  }
  if (_footerClass != null)
  {
    comp.setValueExpression("footerClass", _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.