%3 ::xo::Table::TABLE::BulkAction ::xo::Table::TABLE::BulkAction render render-data ::xo::Drawable ::xo::Drawable _ render_localizer ::xo::Table::TABLE::BulkAction->::xo::Drawable ::xo::Table::TABLE::Action ::xo::Table::TABLE::Action render ::xo::Table::TABLE::Action->::xo::Drawable ::xo::Table::TABLE::Field ::xo::Table::TABLE::Field get_orderby render render-data renderSortLabels ::xo::Table::TABLE::Field->::xo::Drawable ::xo::Table::Line ::xo::Table::Line attlist ::xo::Table::Line->::xo::Drawable ::xo::Table::TABLE ::xo::Table::TABLE init_renderer render render-actions render-body render-bulkactions ::xo::Table::TABLE->::xo::Drawable ::xo::tdom::AttributeManager ::xo::tdom::AttributeManager ::xo::Drawable->::xo::tdom::AttributeManager ::xo::Table::YUIDataTableRenderer::Field ::xo::Table::YUIDataTableRenderer::Field ::xo::Table::YUIDataTableRenderer::Field->::xo::Table::TABLE::Field ::xo::Table::BootstrapTableRenderer::AnchorField ::xo::Table::BootstrapTableRenderer::AnchorField render-data ::xo::Table::BootstrapTableRenderer::AnchorField->::xo::Table::TABLE::Field ::xo::Table::BootstrapTableRenderer::Field ::xo::Table::BootstrapTableRenderer::Field ::xo::Table::BootstrapTableRenderer::Field->::xo::Table::TABLE::Field ::xo::Table::YUIDataTableRenderer::AnchorField ::xo::Table::YUIDataTableRenderer::AnchorField render-data ::xo::Table::YUIDataTableRenderer::AnchorField->::xo::Table::TABLE::Field ::xo::Table::TABLE3::Field ::xo::Table::TABLE3::Field ::xo::Table::TABLE3::Field->::xo::Table::TABLE::Field ::xo::Table::TABLE::AnchorField ::xo::Table::TABLE::AnchorField render-data ::xo::Table::TABLE::AnchorField->::xo::Table::TABLE::Field ::xo::Table::TABLE2::Field ::xo::Table::TABLE2::Field ::xo::Table::TABLE2::Field->::xo::Table::TABLE::Field ::xo::Table::TABLE::ImageAnchorField ::xo::Table::TABLE::ImageAnchorField render-data ::xo::Table::TABLE::ImageAnchorField->::xo::Table::TABLE::Field ::xo::Table::TABLE::ImageField ::xo::Table::TABLE::ImageField render-data ::xo::Table::TABLE::ImageField->::xo::Table::TABLE::Field ::xo::Table::TABLE2::AnchorField ::xo::Table::TABLE2::AnchorField ::xo::Table::TABLE2::AnchorField->::xo::Table::TABLE::AnchorField ::xo::Table::TABLE3::AnchorField ::xo::Table::TABLE3::AnchorField ::xo::Table::TABLE3::AnchorField->::xo::Table::TABLE::AnchorField ::xo::Table::YUIDataTableRenderer::ImageAnchorField ::xo::Table::YUIDataTableRenderer::ImageAnchorField ::xo::Table::YUIDataTableRenderer::ImageAnchorField->::xo::Table::TABLE::ImageAnchorField ::xo::Table::BootstrapTableRenderer::ImageAnchorField ::xo::Table::BootstrapTableRenderer::ImageAnchorField ::xo::Table::BootstrapTableRenderer::ImageAnchorField->::xo::Table::TABLE::ImageAnchorField ::xo::Table::TABLE2::ImageAnchorField ::xo::Table::TABLE2::ImageAnchorField ::xo::Table::TABLE2::ImageAnchorField->::xo::Table::TABLE::ImageAnchorField ::xo::Table::TABLE3::ImageAnchorField ::xo::Table::TABLE3::ImageAnchorField ::xo::Table::TABLE3::ImageAnchorField->::xo::Table::TABLE::ImageAnchorField ::xo::Table::YUIDataTableRenderer::ImageField ::xo::Table::YUIDataTableRenderer::ImageField ::xo::Table::YUIDataTableRenderer::ImageField->::xo::Table::TABLE::ImageField ::xo::Table::BootstrapTableRenderer::ImageField ::xo::Table::BootstrapTableRenderer::ImageField ::xo::Table::BootstrapTableRenderer::ImageField->::xo::Table::TABLE::ImageField ::xo::Table::TABLE3::ImageField ::xo::Table::TABLE3::ImageField ::xo::Table::TABLE3::ImageField->::xo::Table::TABLE::ImageField ::xo::Table::TABLE2::ImageField ::xo::Table::TABLE2::ImageField ::xo::Table::TABLE2::ImageField->::xo::Table::TABLE::ImageField

Class ::xo::Table::TABLE::Field

::xo::Table::TABLE::Field[i] create ...

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xo::Drawable[i]
  • subclass: ::xo::Table::YUIDataTableRenderer::Field[i], ::xo::Table::BootstrapTableRenderer::AnchorField[i], ::xo::Table::BootstrapTableRenderer::Field[i], ::xo::Table::YUIDataTableRenderer::AnchorField[i], ::xo::Table::TABLE3::Field[i], ::xo::Table::TABLE::AnchorField[i], ::xo::Table::TABLE2::Field[i], ::xo::Table::TABLE::ImageAnchorField[i], ::xo::Table::TABLE::ImageField[i]
::xotcl::Class create ::xo::Table::TABLE::Field \
     -superclass ::xo::Drawable

Methods (to be applied on instances)

  • get_orderby (scripted)

    #
    # First, try to get the sort-order from the including ordered
    # composite, which is supposed to be always the data source.
    # Only, when this fails, fall back to the old style based on the
    # adp-level, which is less robust and warn about this usage.
    #
    set ordered_composite [${:__parent} info parent]
    if {[::nsf::is object $ordered_composite] && [$ordered_composite hasclass ::xo::OrderedComposite]} {
      if {![$ordered_composite exists __orderby] || ![$ordered_composite exists __order]} {
        #
        # Tables must always have a defined ordering to ensure stable
        # appearance and correct setup of sorting arrows.
        #
        ad_log warning "downstream application issue: invalid usage of ordered composite:"  "definition of ordering is missing (call method 'orderby' on the ordered composite)."
        set orderby ""
      } else {
        set ordered_composite_orderby [$ordered_composite set __orderby]
        set ordered_composite_order [$ordered_composite set __order]
        if {$ordered_composite_order eq "increasing"} {
          set orderby $ordered_composite_orderby,asc
        } else {
          set orderby $ordered_composite_orderby,desc
        }
      }
    } else {
      ad_log warning "renderSortLabels is still relying on addressing variables on the template::adp_level"
      set lvl [template::adp_level]
      if {$lvl ne ""} {
        upvar #$lvl $orderby_name orderby
      }
      if {![info exists orderby]} {
        set orderby ""
      }
    }
    return $orderby
  • render (scripted)

    set CSSclass [list "list" {*}${:CSSclass}]
    #ns_log notice "FIELD: ${:name}: orderby '${:orderby}' '[:get_orderby]'"
    html::th [concat [list class $CSSclass${:html}] {
      if {${:orderby} eq ""} {
        html::t [:_ label]
      } else {
        :renderSortLabels
      }
      :render_localizer ;# run this before th is closed
    }
  • render-data (scripted)

    $line instvar [list ${:name}.richtext richtext]
    if {![info exists richtext] || $richtext eq ""} {
      set richtext [:richtext]
    }
    if {$richtext} {
      html::t -disableOutputEscaping [$line set ${:name}]
    } else {
      html::t [$line set ${:name}]
    }
  • renderSortLabels (scripted)

    set field ${:orderby}
    set orderby_name orderby
    set orderby [:get_orderby]
    
    set sort_up "sort-inactive"
    set sort_down "sort-inactive"
    
    if {$orderby eq "$field,desc"} {
      set new_orderby $field,asc
      set title [_ xotcl-core.Sort_by_this_column_ascending]
      #set img /resources/acs-templating/sort-ascending.png
      set sort_up "sort-active"
    } elseif {$orderby eq "$field,asc"} {
      set new_orderby $field,desc
      set title [_ xotcl-core.Sort_by_this_column_descending]
      #set img /resources/acs-templating/sort-descending.png
      set sort_down "sort-active"
    } else {
      set new_orderby $field,asc
      set title [_ xotcl-core.Sort_by_this_column]
      #set img /resources/acs-templating/sort-neither.png
    }
    set query [list [list $orderby_name $new_orderby]]
    if {[ns_conn isconnected]} {
      #
      # Called interactively
      #
      set base [ad_conn url]
      set query [ns_conn query]
    } else {
      #
      # Called in the background (e.g. from search renderer)
      #
      set base .
      set query ""
    }
    set href $base?[::xo::update_query $query $orderby_name $new_orderby]
    
    html::a -href $href -title $title {
      html::t [:_ label]
      html::span -class "sort-up $sort_up" {html::t "↑"}
      html::span -class "sort-down $sort_down" {html::t "↓"}
      #html::img -src $img -alt ""
    }