Package org.apache.myfaces.tobago.internal.component

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


  public void perform(SortActionEvent sortEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
    }
    UIColumn column = sortEvent.getColumn();
    AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();

    Object value = data.getValue();
    if (value instanceof DataModel) {
      value = ((DataModel) value).getWrappedData();
    }
    FacesContext facesContext = FacesContext.getCurrentInstance();
    SheetState sheetState = data.getSheetState(facesContext);

    Comparator actualComparator = null;

    if (value instanceof List || value instanceof Object[]) {
      String sortProperty;

      try {

        UIComponent child = getFirstSortableChild(column.getChildren());
        if (child != null) {

          String attributeName = child instanceof AbstractUICommand ? Attributes.LABEL:Attributes.VALUE;
          if (FacesUtils.hasValueBindingOrValueExpression(child, attributeName)) {
            String var = data.getVar();
            String expressionString = FacesUtils.getExpressionString(child, attributeName);
            if (isSimpleProperty(expressionString)) {
              if (expressionString.startsWith("#{")
                  && expressionString.endsWith("}")) {
                expressionString =
View Full Code Here


  public void perform(SortActionEvent sortEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
    }
    UIColumn column = sortEvent.getColumn();
    AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();

    Object value = data.getValue();
    if (value instanceof DataModel) {
      value = ((DataModel) value).getWrappedData();
    }
    FacesContext facesContext = FacesContext.getCurrentInstance();
    SheetState sheetState = data.getSheetState(facesContext);

    Comparator actualComparator = null;

    if (value instanceof List || value instanceof Object[]) {
      String sortProperty;

      try {
        UIComponent child = getFirstSortableChild(column.getChildren());
        if (child != null) {

          String attributeName = child instanceof AbstractUICommand ? Attributes.LABEL : Attributes.VALUE;
          if (child.getValueExpression(attributeName) != null) {
            String var = data.getVar();
            if (var == null) {
                LOG.error("No sorting performed. Property var of sheet is not set!");
                unsetSortableAttribute(column);
                return;
            }
View Full Code Here

  public void perform(SortActionEvent sortEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
    }
    UIColumn column = sortEvent.getColumn();
    AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();

    Object value = data.getValue();
    if (value instanceof DataModel) {
      value = ((DataModel) value).getWrappedData();
    }
    FacesContext facesContext = FacesContext.getCurrentInstance();
    SheetState sheetState = data.getSheetState(facesContext);

    Comparator actualComparator = null;

    if (value instanceof List || value instanceof Object[]) {
      String sortProperty;

      try {

        UIComponent child = getFirstSortableChild(column.getChildren());
        if (child != null) {

          String attributeName = child instanceof AbstractUICommand ? Attributes.LABEL:Attributes.VALUE;
          if (FacesUtils.hasValueBindingOrValueExpression(child, attributeName)) {
            String var = data.getVar();
            String expressionString = FacesUtils.getExpressionString(child, attributeName);
            if (isSimpleProperty(expressionString)) {
              if (expressionString.startsWith("#{")
                  && expressionString.endsWith("}")) {
                expressionString =
View Full Code Here

  public void perform(SortActionEvent sortEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
    }
    UIColumn column = sortEvent.getColumn();
    AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();

    Object value = data.getValue();
    if (value instanceof DataModel) {
      value = ((DataModel) value).getWrappedData();
    }
    FacesContext facesContext = FacesContext.getCurrentInstance();
    SheetState sheetState = data.getSheetState(facesContext);

    Comparator actualComparator = null;

    if (value instanceof List || value instanceof Object[]) {
      String sortProperty;

      try {

        UIComponent child = getFirstSortableChild(column.getChildren());
        if (child != null) {

          String attributeName = child instanceof AbstractUICommand ? Attributes.LABEL:Attributes.VALUE;
          if (FacesUtils.hasValueBindingOrValueExpression(child, attributeName)) {
            String var = data.getVar();
            if (var == null) {
                LOG.error("No sorting performed. Property var of sheet is not set!");
                unsetSortableAttribute(column);
                return;
            }
View Full Code Here

  public void perform(SortActionEvent sortEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
    }
    UIColumn column = sortEvent.getColumn();
    AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();

    Object value = data.getValue();
    if (value instanceof DataModel) {
      value = ((DataModel) value).getWrappedData();
    }
    FacesContext facesContext = FacesContext.getCurrentInstance();
    SheetState sheetState = data.getSheetState(facesContext);

    Comparator actualComparator = null;

    if (value instanceof List || value instanceof Object[]) {
      String sortProperty;

      try {

        UIComponent child = getFirstSortableChild(column.getChildren());
        if (child != null) {
          String var = data.getVar();

          if (FacesUtils.hasValueBindingOrValueExpression(child, "value")) {
            String expressionString = FacesUtils.getExpressionString(child, "value");
            if (isSimpleProperty(expressionString)) {
              if (expressionString.startsWith("#{")
View Full Code Here

  public void perform(final SortActionEvent sortEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
    }
    final UIColumn column = sortEvent.getColumn();
    final AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();

    Object value = data.getValue();
    if (value instanceof DataModel) {
      value = ((DataModel) value).getWrappedData();
    }
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final SheetState sheetState = data.getSheetState(facesContext);

    final Comparator actualComparator;

    if (value instanceof List || value instanceof Object[]) {
      final String sortProperty;

      try {
        final UIComponent child = getFirstSortableChild(column.getChildren());
        if (child != null) {

          final String attributeName = child instanceof AbstractUICommand ? Attributes.LABEL : Attributes.VALUE;
          if (child.getValueExpression(attributeName) != null) {
            final String var = data.getVar();
            if (var == null) {
                LOG.error("No sorting performed. Property var of sheet is not set!");
                unsetSortableAttribute(column);
                return;
            }
View Full Code Here

  public void perform(SortActionEvent sortEvent) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
    }
    UIColumn column = sortEvent.getColumn();
    AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();

    Object value = data.getValue();
    if (value instanceof DataModel) {
      value = ((DataModel) value).getWrappedData();
    }
    FacesContext facesContext = FacesContext.getCurrentInstance();
    SheetState sheetState = data.getSheetState(facesContext);

    Comparator actualComparator = null;

    if (value instanceof List || value instanceof Object[]) {
      String sortProperty;

      try {

        UIComponent child = getFirstSortableChild(column.getChildren());
        if (child != null) {

          String attributeName = child instanceof AbstractUICommand ? Attributes.LABEL:Attributes.VALUE;
          if (FacesUtils.hasValueBindingOrValueExpression(child, attributeName)) {
            String var = data.getVar();
            if (var == null) {
                LOG.error("No sorting performed. Property var of sheet is not set!");
                unsetSortableAttribute(column);
                return;
            }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.internal.component.AbstractUISheet

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.