Examples of AbstractUIColumn


Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

          if (!pure) {
            headerHeight = headerHeight.subtract(6); // XXX todo
          }
          headerStyle.setHeight(headerHeight);
          writer.writeStyleAttribute(headerStyle);
          final AbstractUIColumn column = renderedColumnList.get(j);
          String sorterImage = null;
          Markup markup = Markup.NULL;
          String tip = (String) column.getAttributes().get(Attributes.TIP);
          if (cell.getColumnSpan() == 1) {
            final boolean sortable = ComponentUtils.getBooleanAttribute(column, Attributes.SORTABLE);
            if (sortable) {
              UICommand sortCommand = (UICommand) column.getFacet(Facets.SORTER);
              if (sortCommand == null) {
                final String columnId = column.getClientId(facesContext);
                final String sorterId = columnId.substring(columnId.lastIndexOf(":") + 1) + "_" + UISheet.SORTER_ID;
                sortCommand = (UICommand) CreateComponentUtils.createComponent(
                    facesContext, UICommand.COMPONENT_TYPE, RendererTypes.LINK, sorterId);
                column.getFacets().put(Facets.SORTER, sortCommand);
              }
              final CommandMap map = new CommandMap();
              final Command click = new Command(sortCommand.getClientId(facesContext),
                  null, null, null, new String[]{sheet.getClientId(facesContext)}, null, null, null, null, null);
              map.setClick(click);
              writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(map), true);

              if (tip == null) {
                tip = "";
              } else {
                tip += " - ";
              }
              tip += ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetTipSorting");

              markup = markup.add(Markup.SORTABLE);

              SheetState sheetState = sheet.getSheetState(facesContext);
              if (column.getId().equals(sheetState.getSortedColumnId())) {
                String sortTitle;
                if (sheetState.isAscending()) {
                  sorterImage = contextPath + resourceManager.getImage(facesContext, "image/ascending.gif");
                  sortTitle = ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetAscending");
                  markup = markup.add(Markup.ASCENDING);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

    return createColumn(label, sortable, align, child, null);
  }

  public static AbstractUIColumn createColumn(
      String label, String sortable, String align, UIComponent child, String clientId) {
    AbstractUIColumn column = createColumn(label, sortable, align, clientId);
    //noinspection unchecked
    column.getChildren().add(child);
    return column;
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

  public static AbstractUIColumn createColumn(String label, String sortable, String align) {
    return createColumn(label, sortable, align, (String) null);
  }

  public static AbstractUIColumn createColumn(String label, String sortable, String align, String clientId) {
    AbstractUIColumn column = (AbstractUIColumn) createComponent(ComponentTypes.COLUMN, null, clientId);
    ComponentAttributeUtils.setStringProperty(column, Attributes.LABEL, label);
    ComponentAttributeUtils.setBooleanProperty(column, Attributes.SORTABLE, sortable);
    ComponentAttributeUtils.setStringProperty(column, Attributes.ALIGN, align);
    return column;
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

    return createColumn(label, sortable, align, child, null);
  }

  public static AbstractUIColumn createColumn(
      String label, String sortable, String align, UIComponent child, String clientId) {
    AbstractUIColumn column = createColumn(label, sortable, align, clientId);
    //noinspection unchecked
    column.getChildren().add(child);
    return column;
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

  public static AbstractUIColumn createColumn(String label, String sortable, String align) {
    return createColumn(label, sortable, align, (String) null);
  }

  public static AbstractUIColumn createColumn(String label, String sortable, String align, String clientId) {
    AbstractUIColumn column = (AbstractUIColumn) createComponent(ComponentTypes.COLUMN, null, clientId);
    ComponentAttributeUtils.setStringProperty(column, Attributes.LABEL, label);
    ComponentAttributeUtils.setBooleanProperty(column, Attributes.SORTABLE, sortable);
    ComponentAttributeUtils.setStringProperty(column, Attributes.ALIGN, align);
    return column;
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

          if (!pure) {
            headerHeight = headerHeight.subtract(6); // XXX todo
          }
          headerStyle.setHeight(headerHeight);
          writer.writeStyleAttribute(headerStyle);
          final AbstractUIColumn column = renderedColumnList.get(j);
          String sorterImage = null;
          Markup markup = Markup.NULL;
          String tip = (String) column.getAttributes().get(Attributes.TIP);
          if (cell.getColumnSpan() == 1) {
            final boolean sortable = ComponentUtils.getBooleanAttribute(column, Attributes.SORTABLE);
            if (sortable) {
              UICommand sortCommand = (UICommand) column.getFacet(Facets.SORTER);
              if (sortCommand == null) {
                final String columnId = column.getClientId(facesContext);
                final String sorterId = columnId.substring(columnId.lastIndexOf(":") + 1) + "_" + UISheet.SORTER_ID;
                sortCommand = (UICommand) CreateComponentUtils.createComponent(
                    facesContext, UICommand.COMPONENT_TYPE, RendererTypes.LINK, sorterId);
                column.getFacets().put(Facets.SORTER, sortCommand);
              }
              final CommandMap map = new CommandMap();
              final Command click = new Command(sortCommand.getClientId(facesContext),
                  null, null, null, new String[]{sheet.getClientId(facesContext)}, null, null, null, null, null);
              map.setClick(click);
              writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(map), true);

              if (tip == null) {
                tip = "";
              } else {
                tip += " - ";
              }
              tip += ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetTipSorting");

              markup = markup.add(Markup.SORTABLE);

              final SheetState sheetState = sheet.getSheetState(facesContext);
              if (column.getId().equals(sheetState.getSortedColumnId())) {
                final String sortTitle;
                if (sheetState.isAscending()) {
                  sorterImage = contextPath + resourceManager.getImage(facesContext, "image/ascending.gif");
                  sortTitle = ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetAscending");
                  markup = markup.add(Markup.ASCENDING);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

          if (!pure) {
            headerHeight = headerHeight.subtract(6); // XXX todo
          }
          headerStyle.setHeight(headerHeight);
          writer.writeStyleAttribute(headerStyle);
          final AbstractUIColumn column = renderedColumnList.get(j);
          String sorterImage = null;
          Markup markup = Markup.NULL;
          String tip = (String) column.getAttributes().get(Attributes.TIP);
          if (cell.getColumnSpan() == 1) {
            final boolean sortable = ComponentUtils.getBooleanAttribute(column, Attributes.SORTABLE);
            if (sortable) {
              UICommand sortCommand = (UICommand) column.getFacet(Facets.SORTER);
              if (sortCommand == null) {
                final String columnId = column.getClientId(facesContext);
                final String sorterId = columnId.substring(columnId.lastIndexOf(":") + 1) + "_" + UISheet.SORTER_ID;
                sortCommand = (UICommand) CreateComponentUtils.createComponent(
                    facesContext, UICommand.COMPONENT_TYPE, RendererTypes.LINK, sorterId);
                column.getFacets().put(Facets.SORTER, sortCommand);
              }
              final CommandMap map = new CommandMap();
              final Command click = new Command(sortCommand.getClientId(facesContext),
                  null, null, null, new String[]{sheet.getClientId(facesContext)}, null, null, null, null, null);
              map.setClick(click);
              writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(map), true);

              if (tip == null) {
                tip = "";
              } else {
                tip += " - ";
              }
              tip += ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetTipSorting");

              markup = markup.add(Markup.SORTABLE);

              final SheetState sheetState = sheet.getSheetState(facesContext);
              if (column.getId().equals(sheetState.getSortedColumnId())) {
                final String sortTitle;
                if (sheetState.isAscending()) {
                  sorterImage = contextPath + resourceManager.getImage(facesContext, "image/ascending.gif");
                  sortTitle = ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetAscending");
                  markup = markup.add(Markup.ASCENDING);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

          if (!pure) {
            headerHeight = headerHeight.subtract(6); // XXX todo
          }
          headerStyle.setHeight(headerHeight);
          writer.writeStyleAttribute(headerStyle);
          final AbstractUIColumn column = renderedColumnList.get(j);
          String sorterImage = null;
          Markup markup = Markup.NULL;
          String tip = (String) column.getAttributes().get(Attributes.TIP);
          if (cell.getColumnSpan() == 1) {
            final boolean sortable = ComponentUtils.getBooleanAttribute(column, Attributes.SORTABLE);
            if (sortable) {
              UICommand sortCommand = (UICommand) column.getFacet(Facets.SORTER);
              if (sortCommand == null) {
                final String columnId = column.getClientId(facesContext);
                final String sorterId = columnId.substring(columnId.lastIndexOf(":") + 1) + "_" + UISheet.SORTER_ID;
                sortCommand = (UICommand) CreateComponentUtils.createComponent(
                    facesContext, UICommand.COMPONENT_TYPE, RendererTypes.LINK, sorterId);
                column.getFacets().put(Facets.SORTER, sortCommand);
              }
              final CommandMap map = new CommandMap();
              final Command click = new Command(sortCommand.getClientId(facesContext),
                  null, null, null, new String[]{sheet.getClientId(facesContext)}, null, null, null, null, null);
              map.setClick(click);
              writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(map), true);

              if (tip == null) {
                tip = "";
              } else {
                tip += " - ";
              }
              tip += ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetTipSorting");

              markup = markup.add(Markup.SORTABLE);

              final SheetState sheetState = sheet.getSheetState(facesContext);
              if (column.getId().equals(sheetState.getSortedColumnId())) {
                final String sortTitle;
                if (sheetState.isAscending()) {
                  sorterImage = contextPath + resourceManager.getImage(facesContext, "image/ascending.gif");
                  sortTitle = ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetAscending");
                  markup = markup.add(Markup.ASCENDING);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

          if (!pure) {
            headerHeight = headerHeight.subtract(6); // XXX todo
          }
          headerStyle.setHeight(headerHeight);
          writer.writeStyleAttribute(headerStyle);
          final AbstractUIColumn column = renderedColumnList.get(j);
          String sorterImage = null;
          Markup markup = Markup.NULL;
          String tip = (String) column.getAttributes().get(Attributes.TIP);
          if (cell.getColumnSpan() == 1) {
            final boolean sortable = ComponentUtils.getBooleanAttribute(column, Attributes.SORTABLE);
            if (sortable) {
              UICommand sortCommand = (UICommand) column.getFacet(Facets.SORTER);
              if (sortCommand == null) {
                final String columnId = column.getClientId(facesContext);
                final String sorterId = columnId.substring(columnId.lastIndexOf(":") + 1) + "_" + UISheet.SORTER_ID;
                sortCommand = (UICommand) CreateComponentUtils.createComponent(
                    facesContext, UICommand.COMPONENT_TYPE, RendererTypes.LINK, sorterId);
                column.getFacets().put(Facets.SORTER, sortCommand);
              }
              final CommandMap map = new CommandMap();
              final Command click = new Command(sortCommand.getClientId(facesContext),
                  null, null, null, new String[]{sheet.getClientId(facesContext)}, null, null, null, null, null);
              map.setClick(click);
              writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(map), true);

              if (tip == null) {
                tip = "";
              } else {
                tip += " - ";
              }
              tip += ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetTipSorting");

              markup = markup.add(Markup.SORTABLE);

              final SheetState sheetState = sheet.getSheetState(facesContext);
              if (column.getId().equals(sheetState.getSortedColumnId())) {
                final String sortTitle;
                if (sheetState.isAscending()) {
                  sorterImage = contextPath + resourceManager.getImage(facesContext, "image/ascending.gif");
                  sortTitle = ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetAscending");
                  markup = markup.add(Markup.ASCENDING);
View Full Code Here

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIColumn

    return createColumn(label, sortable, align, child, null);
  }

  public static AbstractUIColumn createColumn(
      String label, String sortable, String align, UIComponent child, String clientId) {
    AbstractUIColumn column = createColumn(label, sortable, align, clientId);
    //noinspection unchecked
    column.getChildren().add(child);
    return column;
  }
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.