Class ::xo::Table (public)
::xotcl::Class ::xo::Table
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo {}
::nsf::object::alloc ::xotcl::Class ::xo::Table {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table instproc format_csv {{-delimiter ","}} {
set output ""
set line [list]
set displayColumns [lmap column [[self]::__columns children] {
if {[$column exists no_csv]} continue
if {[$column istype ::xo::Table::BulkAction]} continue
if {[$column istype ::xo::Table::HiddenField]} continue
set column
}]
foreach column $displayColumns {
set label [$column label]
if {[regexp {^#([a-zA-Z0-9_:-]+\.[a-zA-Z0-9_:-]+)#$} $label _ message_key]} {
set label [_ $message_key]
}
set value [string map {\" \\\" \n \r} $label]
lappend line \"$value\"
}
append output [join $line $delimiter] \n
foreach row [:children] {
set line [list]
foreach column $displayColumns {
set value [string map {\" \\\" \n \r} [$row set [$column set name]]]
lappend line \"$value\"
}
append output [join $line $delimiter] \n
}
return $output
}
::xo::Table instproc actions cmd {
set M [OrderedComposite create [self]::__actions]
namespace eval $M [list namespace import -force [self class]::*]
$M contains $cmd
}
::xo::Table instproc __bulkactions cmd {
set M [OrderedComposite create [self]::__bulkactions]
namespace eval $M [list namespace import -force [self class]::*]
$M contains $cmd
}
::xo::Table instproc columns cmd {
set M [OrderedComposite create [self]::__columns]
namespace eval $M [list namespace import -force [self class]::*]
$M contains $cmd
set slots [list]
foreach c [$M children] {
lappend slots {*}[$c get-slots]
}
:proc add $slots {
set __self [::xo::Table::Line new]
foreach __v [info vars] {$__self set $__v [set $__v]}
next $__self
}
}
::xo::Table instproc column_names {} {
set names {}
foreach c [[[self]::__columns] children] {
lappend names [$c name]
}
return $names
}
::xo::Table instproc destroy {} {
foreach c {__bulkactions __actions __columns} {
namespace eval [self]::$c {namespace forget *}
}
next
}
::xo::Table instproc write_csv {{-delimiter ","}} {
if {![info exists :name]} {
set :name "table"
}
set fn [xo::backslash_escape \" ${:name}.csv]
ns_set put [ns_conn outputheaders] Content-Disposition "attachment;filename=\"$fn\""
ns_return 200 "text/csv; charset=utf-8" [:format_csv -delimiter $delimiter]
ad_script_abort
}
::xo::Table instproc render_with {renderer trn_mixin} {
set cl [self class]
:mixin ${cl}::$renderer
foreach child [$cl info classchildren] {
set mixinname ${cl}::${renderer}::[namespace tail $child]
if {[::xotcl::Object isclass $mixinname]} {
$child instmixin $mixinname
if {$trn_mixin ne ""} {$child instmixin add $trn_mixin}
} else {
}
}
Table::Line instmixin $trn_mixin
:init_renderer
}
::xo::Table instparametercmd name
::xo::Table instparametercmd no_data
::xo::Table instparametercmd renderer
::nsf::relation::set ::xo::Table superclass ::xo::OrderedComposite
::nsf::object::alloc ::xotcl::Class ::xo::Table::Action {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::Action instparametercmd label
::xo::Table::Action instparametercmd confirm_message
::xo::Table::Action instparametercmd url
::xo::Table::Action instparametercmd tooltip
::xo::Table::Action instparametercmd CSSclass
::nsf::relation::set ::xo::Table::Action superclass ::xo::OrderedComposite::Child
::nx::slotObj -container slot ::xo::Table
::xo::Table::slot eval {set :__parameter {
{no_data "#xotcl-core.No_Data#"}
{renderer TABLE3}
name
}}
::nsf::object::alloc ::xotcl::Class ::xo::Table::Field {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::Field instproc init {} {
set :name [namespace tail [self]]
}
::xo::Table::Field instproc get-slots {} {
set slots [list -${:name}]
foreach subfield {richtext CSSclass} {
lappend slots [list -${:name}.$subfield ""]
}
return $slots
}
::xo::Table::Field instparametercmd label
::xo::Table::Field instparametercmd no_csv
::xo::Table::Field instparametercmd html
::xo::Table::Field instparametercmd name
::xo::Table::Field instparametercmd hide
::xo::Table::Field instparametercmd orderby
::xo::Table::Field instparametercmd CSSclass
::xo::Table::Field instparametercmd richtext
::nsf::relation::set ::xo::Table::Field superclass ::xo::OrderedComposite::Child
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE instproc render-bulkactions {} {
set bulkactions [[self]::__bulkactions children]
html::div -class "list-button-bar-bottom" {
html::t "#xotcl-core.Bulk_actions#:"
set bulkaction_container [[lindex $bulkactions 0] set __parent]
set name [$bulkaction_container set __identifier]
html::ul -class compact {
foreach ba $bulkactions {
set id [::xowiki::Includelet html_id $ba]
html::li {
html::a -title [$ba tooltip] -id $id -class button -href # {
html::t [$ba label]
}
}
set script [subst {
acs_ListBulkActionClick("$name","[$ba url]");
}]
if {[$ba confirm_message] ne ""} {
set script [subst {
if (confirm('[$ba confirm_message]')) {
$script
}
}]
}
template::add_event_listener -id $id -preventdefault=false -script $script
}
}
}
}
::xo::Table::TABLE instproc render {} {
if {![nsf::is object [self]::__actions]} {:actions {}}
if {![nsf::is object [self]::__bulkactions]} {:bulkactions {}}
set bulkactions [[self]::__bulkactions children]
if {[llength $bulkactions] == 0} {
html::table -class ${:css.table-class} {
:render-actions
:render-body
}
} else {
set name [[self]::__bulkactions set __identifier]
html::form -name $name -method POST {
html::table -class ${:css.table-class} {
:render-actions
:render-body
}
:render-bulkactions
}
}
}
::xo::Table::TABLE instproc init_renderer {} {
set :__rowcount 0
set :css.table-class list
set :css.tr.even-class list-even
set :css.tr.odd-class list-odd
}
::xo::Table::TABLE instproc render-actions {} {
html::tr -class list-button-bar {
set cols [llength [[self]::__columns children]]
html::td -colspan $cols -class list-button-bar {
set children [[self]::__actions children]
set last [lindex $children end]
foreach o $children {
$o render
if {$o ne $last} {
html::t -disableOutputEscaping "·"
}
}
}
}
}
::xo::Table::TABLE instproc render-body {} {
html::thead {
html::tr -class list-header {
foreach o [[self]::__columns children] {
$o render
}
}
}
set children [:children]
if {[llength $children] == 0} {
html::tr {html::td { html::t ${:no_data}}}
} else {
html::tbody {
foreach line [:children] {
html::tr -class [expr {[incr :__rowcount]%2 ? ${:css.tr.odd-class} : ${:css.tr.even-class}}] {
foreach field [[self]::__columns children] {
if {[$field istype HiddenField]} continue
if {![$field exists CSSclass]} {
ns_log warning "CSSclass missing $field\n[$field serialize]"
$field set CSSclass ""
}
set CSSclass [list "list" {*}[$field CSSclass]]
html::td [concat [list class $CSSclass] [$field html]] {
$field render-data $line
}
}
}
}
}
}
}
::nsf::relation::set ::xo::Table::TABLE superclass ::xo::Drawable
::nsf::object::alloc ::xotcl::Class ::xo::Table::Line {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::Line instproc attlist {name atts {extra {}}} {
set result [list]
foreach att $atts {
set varname $name.$att
if {[info exists :$varname]} {
lappend result $att [::xo::localize [set :$varname]]
}
}
foreach {att val} $extra {lappend result $att $val}
return $result
}
::nsf::relation::set ::xo::Table::Line superclass ::xo::Drawable
::nsf::object::alloc ::xotcl::Class ::xo::Table::BulkAction {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::BulkAction instproc actions cmd {
set grandParent [[:info parent] info parent]
if {![info exists :name]} {set :name [namespace tail [self]]}
set M [::xo::OrderedComposite create ${grandParent}::__bulkactions -noinit]
namespace eval $M {namespace import -force ::xo::Table::*}
$M contains $cmd
$M set __belongs_to [self]
$M set __identifier ${:name}
}
::xo::Table::BulkAction instproc get-slots {} {
;
}
::xo::Table::BulkAction instparametercmd html
::xo::Table::BulkAction instparametercmd id
::xo::Table::BulkAction instparametercmd name
::xo::Table::BulkAction instparametercmd hide
::xo::Table::BulkAction instparametercmd CSSclass
::nsf::relation::set ::xo::Table::BulkAction superclass ::xo::OrderedComposite::Child
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::slot::renderer {set :accessor public
set :configurable true
set :convert false
set :default TABLE3
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table
set :incremental 0
set :manager ::xo::Table::slot::renderer
set :methodname renderer
set :multiplicity 1..1
set :name renderer
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nx::slotObj -container slot ::xo::Table::BulkAction
::xo::Table::BulkAction::slot eval {set :__parameter {{CSSclass ""} name id {html {}} {hide 0}}}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::slot::no_data {set :accessor public
set :configurable true
set :convert false
set :default #xotcl-core.No_Data#
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table
set :incremental 0
set :manager ::xo::Table::slot::no_data
set :methodname no_data
set :multiplicity 1..1
set :name no_data
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE::Field {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE::Field instproc render {} {
set CSSclass [list "list" {*}${:CSSclass}]
html::th [concat [list class $CSSclass] ${:html}] {
if {${:orderby} eq ""} {
html::t [:_ label]
} else {
:renderSortLabels
}
:render_localizer ;
}
}
::xo::Table::TABLE::Field instproc get_orderby {} {
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]} {
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
}
::xo::Table::TABLE::Field instproc render-data line {
$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}]
}
}
::xo::Table::TABLE::Field instproc renderSortLabels {} {
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 sort_up "sort-active"
} elseif {$orderby eq "$field,asc"} {
set new_orderby $field,desc
set title [_ xotcl-core.Sort_by_this_column_descending]
set sort_down "sort-active"
} else {
set new_orderby $field,asc
set title [_ xotcl-core.Sort_by_this_column]
}
set query [list [list $orderby_name $new_orderby]]
if {[ns_conn isconnected]} {
set base [ad_conn url]
set query [ns_conn query]
} else {
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 "↓"}
}
}
::nsf::relation::set ::xo::Table::TABLE::Field superclass ::xo::Drawable
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE::BulkAction {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE::BulkAction instproc render {} {
html::th -class list {
html::input -type checkbox -name __bulkaction -id __bulkaction -title "Mark/Unmark all rows"
::html::CSRFToken
}
template::add_body_script -script [subst {
document.getElementById('__bulkaction').addEventListener('click', function (event) {
acs_ListCheckAll('${:name}', this.checked);
}, false);
}]
}
::xo::Table::TABLE::BulkAction instproc render-data line {
set name ${:name}
set value [$line set [:id]]
html::input -type checkbox -name $name -value $value -id "$name---[string map {/ _} $value]" -title "Mark/Unmark this row"
}
::xo::Table::TABLE::BulkAction instparametercmd CSSclass
::nsf::relation::set ::xo::Table::TABLE::BulkAction superclass ::xo::Drawable
::nx::slotObj -container slot ::xo::Table::Field
::xo::Table::Field::slot eval {set :__parameter {
label
{html {}}
{orderby ""}
name
{richtext false}
no_csv
{CSSclass ""}
{hide 0}
}}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::slot::name {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table
set :incremental 0
set :manager ::xo::Table::slot::name
set :methodname name
set :multiplicity 1..1
set :name name
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2 {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE2 instproc render {} {
if {![nsf::is object [self]::__actions]} {:actions {}}
if {![nsf::is object [self]::__bulkactions]} {:__bulkactions {}}
set bulkactions [[self]::__bulkactions children]
html::div {
:render-actions
if {![[self]::__bulkactions exists __identifier]} {
html::div -class table {
html::table -class ${:css.table-class} {:render-body}
}
} else {
set name [[self]::__bulkactions set __identifier]
html::form -name $name -action "" {
html::div -class table {
html::table -class ${:css.table-class} {:render-body}
:render-bulkactions
}
}
}
}
}
::xo::Table::TABLE2 instproc render-actions {} {
set actions [[self]::__actions children]
if {[llength $actions] > 0} {
html::div -class "actions" -style "float: left;" {
html::ul -style "list-style:none; padding: 10px;" {
foreach o $actions { html::li -class "button" {$o render} }
}
}
}
}
::nsf::relation::set ::xo::Table::TABLE2 superclass ::xo::Table::TABLE
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE::Action {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE::Action instproc render {} {
html::a -class "button ${:CSSclass}" -title [:_ tooltip] -href ${:url} {
html::t [:_ label]
}
}
::nsf::relation::set ::xo::Table::TABLE::Action superclass ::xo::Drawable
::nx::slotObj -container slot ::xo::Table::Action
::xo::Table::Action::slot eval {set :__parameter {{CSSclass ""} label url {tooltip {}} {confirm_message {}}}}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE::HiddenField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE::HiddenField instproc render {} {;}
::xo::Table::TABLE::HiddenField instproc render-data line {;}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::label {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::label
set :methodname label
set :multiplicity 1..1
set :name label
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::name {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::name
set :methodname name
set :multiplicity 1..1
set :name name
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Action::slot::tooltip {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Action
set :incremental 0
set :manager ::xo::Table::Action::slot::tooltip
set :methodname tooltip
set :multiplicity 1..1
set :name tooltip
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::BulkAction::slot::id {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::BulkAction
set :incremental 0
set :manager ::xo::Table::BulkAction::slot::id
set :methodname id
set :multiplicity 1..1
set :name id
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE::ImageAnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE::ImageAnchorField instproc render-data line {
if {[$line exists ${:name}.href]
&& [set href [$line set ${:name}.href]] ne ""
} {
$line instvar [list ${:name}.CSSclass CSSclass]
html::a [:get_local_attributes href {style "border-bottom: none;"} {CSSclass class}] {
html::img [$line attlist ${:name} {src width height border title alt}] {}
}
$line render_localizer
}
}
::nsf::relation::set ::xo::Table::TABLE::ImageAnchorField superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Action::slot::CSSclass {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Action
set :incremental 0
set :manager ::xo::Table::Action::slot::CSSclass
set :methodname CSSclass
set :multiplicity 1..1
set :name CSSclass
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Action::slot::label {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Action
set :incremental 0
set :manager ::xo::Table::Action::slot::label
set :methodname label
set :multiplicity 1..1
set :name label
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::BulkAction::slot::hide {set :accessor public
set :configurable true
set :convert false
set :default 0
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::BulkAction
set :incremental 0
set :manager ::xo::Table::BulkAction::slot::hide
set :methodname hide
set :multiplicity 1..1
set :name hide
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::CSSclass {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::CSSclass
set :methodname CSSclass
set :multiplicity 1..1
set :name CSSclass
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Action::slot::confirm_message {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Action
set :incremental 0
set :manager ::xo::Table::Action::slot::confirm_message
set :methodname confirm_message
set :multiplicity 1..1
set :name confirm_message
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2::Field {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE2::Field superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2::HiddenField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE2::HiddenField superclass ::xo::Table::TABLE::HiddenField
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::BulkAction::slot::html {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::BulkAction
set :incremental 0
set :manager ::xo::Table::BulkAction::slot::html
set :methodname html
set :multiplicity 1..1
set :name html
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::hide {set :accessor public
set :configurable true
set :convert false
set :default 0
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::hide
set :methodname hide
set :multiplicity 1..1
set :name hide
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE::AnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE::AnchorField instproc render-data line {
if {[$line exists ${:name}.href]
&& [set href [$line set ${:name}.href]] ne ""
} {
set CSSclass ${:CSSclass}
if {[$line exists ${:name}.CSSclass]} {
set lineCSSclass [$line set ${:name}.CSSclass]
if {$lineCSSclass ne ""} {
append CSSclass " " $lineCSSclass
}
}
$line instvar [list ${:name}.title title]
html::a [:get_local_attributes href title {CSSclass class}] {
return [next]
}
}
next
}
::nsf::relation::set ::xo::Table::TABLE::AnchorField superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::BulkAction::slot::name {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::BulkAction
set :incremental 0
set :manager ::xo::Table::BulkAction::slot::name
set :methodname name
set :multiplicity 1..1
set :name name
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::richtext {set :accessor public
set :configurable true
set :convert false
set :default false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::richtext
set :methodname richtext
set :multiplicity 1..1
set :name richtext
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Action::slot::url {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Action
set :incremental 0
set :manager ::xo::Table::Action::slot::url
set :methodname url
set :multiplicity 1..1
set :name url
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE::ImageField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE::ImageField instproc render-data line {
$line instvar [list ${:name}.CSSclass CSSclass]
html::a [:get_local_attributes href {style "border-bottom: none;"} {CSSclass class}] {
html::img [$line attlist ${:name} {src width height border title alt}] {}
}
$line render_localizer
}
::nsf::relation::set ::xo::Table::TABLE::ImageField superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3 {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::TABLE3 instproc init_renderer {} {
next
set :css.table-class list-table
set :css.tr.even-class even
set :css.tr.odd-class odd
}
::nsf::relation::set ::xo::Table::TABLE3 superclass ::xo::Table::TABLE2
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::orderby {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::orderby
set :methodname orderby
set :multiplicity 1..1
set :name orderby
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::no_csv {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::no_csv
set :methodname no_csv
set :multiplicity 1..1
set :name no_csv
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::Field::slot::html {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::Field
set :incremental 0
set :manager ::xo::Table::Field::slot::html
set :methodname html
set :multiplicity 1..1
set :name html
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::BulkAction::slot::CSSclass {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::BulkAction
set :incremental 0
set :manager ::xo::Table::BulkAction::slot::CSSclass
set :methodname CSSclass
set :multiplicity 1..1
set :name CSSclass
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nx::slotObj -container slot ::xo::Table::TABLE::BulkAction
::xo::Table::TABLE::BulkAction::slot eval {set :__parameter {{CSSclass ""}}}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2::Action {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE2::Action superclass ::xo::Table::TABLE::Action
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2::AnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE2::AnchorField superclass ::xo::Table::TABLE::AnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3::Action {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE3::Action superclass ::xo::Table::TABLE::Action
::nsf::object::alloc ::xotcl::Class ::xo::Table::ImageField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::ImageField instproc get-slots {} {
set slots [list -${:name}]
lappend slots [list -${:name}.src ${:src}]
lappend slots [list -${:name}.CSSclass ${:CSSclass}]
foreach att {width height border title alt} {
if {[info exists :$att]} {
lappend slots [list -${:name}.$att [:$att]]
} else {
lappend slots [list -${:name}.$att]
}
}
return $slots
}
::xo::Table::ImageField instparametercmd src
::xo::Table::ImageField instparametercmd width
::xo::Table::ImageField instparametercmd height
::xo::Table::ImageField instparametercmd alt
::xo::Table::ImageField instparametercmd border
::xo::Table::ImageField instparametercmd title
::nsf::relation::set ::xo::Table::ImageField superclass ::xo::Table::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3::HiddenField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE3::HiddenField superclass ::xo::Table::TABLE::HiddenField
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3::ImageAnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE3::ImageAnchorField superclass ::xo::Table::TABLE::ImageAnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3::Field {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE3::Field superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::BootstrapTableRenderer instproc render-bulkactions {} {
set bulkactions [[self]::__bulkactions children]
if {[llength $bulkactions] > 0} {
html::div -class "btn-group align-items-center" -role group -aria-label "Bulk actions" {
html::span -class "bulk-action-label" {
html::t "#xotcl-core.Bulk_actions#:"
}
html::ul -class compact {
set bulkaction_container [[lindex $bulkactions 0] set __parent]
set name [$bulkaction_container set __identifier]
foreach bulk_action $bulkactions {
set id [::xowiki::Includelet html_id $bulk_action]
html::li {
html::a -class [::template::CSS class bulk-action] -rule button -title [$bulk_action tooltip] -href # -id $id {
html::t [$bulk_action label]
}
}
set script [subst {
acs_ListBulkActionClick("$name","[$bulk_action url]");
}]
if {[$bulk_action confirm_message] ne ""} {
set script [subst {
if (confirm('[$bulk_action confirm_message]')) {
$script
}
}]
}
template::add_event_listener -id $id -preventdefault=false -script $script
}
}
}
}
}
::xo::Table::BootstrapTableRenderer instproc render {} {
::template::CSS require_toolkit -css
if {![nsf::is object [self]::__actions]} {:actions {}}
if {![nsf::is object [self]::__bulkactions]} {:__bulkactions {}}
set bulkactions [[self]::__bulkactions children]
if {[[self]::__bulkactions exists __identifier]} {
set name [[self]::__bulkactions set __identifier]
html::div -id ${:id}_wrapper -class "table-responsive" {
html::form -name $name -id $name -method POST {
html::div -id ${:id}_container {
html::table -id ${:id} -class ${:css.table-class} {
:render-actions
:render-body
}
:render-bulkactions
}
}
}
} else {
set name [::xowiki::Includelet js_name [self]]
html::div -id ${:id}_wrapper -class "table-responsive" {
html::div -id ${:id}_container {
html::table -id ${:id} -class ${:css.table-class} {
:render-actions
:render-body
}
}
}
}
}
::xo::Table::BootstrapTableRenderer instproc init_renderer {} {
next
set :css.table-class "table table-striped"
set :css.tr.even-class "align-middle"
set :css.tr.odd-class "align-middle"
set :id [::xowiki::Includelet js_name [::xowiki::Includelet html_id [self]]]
}
::xo::Table::BootstrapTableRenderer instproc render-body {} {
html::thead {
html::tr -class list-header {
foreach o [[self]::__columns children] {
if {[$o hide]} continue
$o render
}
}
}
ad_try {
set children [:children]
} on error {errorMsg} {
html::div -class "alert alert-danger" {
html::span -class danger {
html::t $errorMsg
}
}
return
}
html::tbody {
foreach line [:children] {
html::tr -class [expr {[incr :__rowcount]%2 ? ${:css.tr.odd-class} : ${:css.tr.even-class} }] {
foreach field [[self]::__columns children] {
if {[$field hide]} continue
if {[$field istype HiddenField]} continue
set CSSclass [list "list" {*}[$field CSSclass]]
html::td [concat [list class $CSSclass] [$field html]] {
$field render-data $line
}
}
}
}
}
}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer superclass ::xo::Table::TABLE3
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::YUIDataTableRenderer instproc render {} {
::YUI::loader require -module "datatable"
if {![nsf::is object [self]::__actions]} {:actions {}}
if {![nsf::is object [self]::__bulkactions]} {:__bulkactions {}}
set bulkactions [[self]::__bulkactions children]
if {[[self]::__bulkactions exists __identifier] || [llength $bulkactions]>0} {
set name [[self]::__bulkactions set __identifier]
} else {
set name [::xowiki::Includelet js_name [self]]
}
set skin [expr {[info exists :skin] ? ${:skin} : ""}]
html::div -id ${:id}_wrapper -class $skin {
html::form -name $name -id $name -method POST {
html::div -id ${:id}_container {
html::table -id ${:id} -class ${:css.table-class} {
:render-actions
:render-body
}
if {[llength $bulkactions]>0} { :render-bulkactions }
}
}
::xo::Page requireJS "YAHOO.util.Event.onDOMReady(function () {\n[:render_yui_js]});"
}
}
::xo::Table::YUIDataTableRenderer instproc init_renderer {} {
next
set :css.table-class list-table
set :css.tr.even-class even
set :css.tr.odd-class odd
set :id [::xowiki::Includelet js_name [::xowiki::Includelet html_id [self]]]
}
::xo::Table::YUIDataTableRenderer instproc render_yui_js {} {
set container ${:id}_container
set datasource ${:id}_datasource
set datatable ${:id}_datatable
set coldef ${:id}_coldef
set finaljs ""
set js "var $datasource = new YAHOO.util.DataSource(YAHOO.util.Dom.get('${:id}')); \n"
append js "$datasource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; \n"
append js "$datasource.responseSchema = \{ \n"
append js " fields: \[ \n"
set js_fields [list]
foreach field [[self]::__columns children] {
if {[$field hide]} continue
lappend js_fields " \{ key: \"[$field set name]\" \}"
}
append js [join $js_fields ", "] " \] \n\};\n"
append js "var $coldef = \[\n"
set js_fields [list]
foreach field [[self]::__columns children] {
if {[$field hide]} continue
if {[$field istype HiddenField]} continue
if {[$field istype BulkAction]} {
set subid [::xowiki::Includelet html_id $field]
set label "<input type='checkbox' id='$subid'></input>"
if {[info exists ::__csrf_token]} {
append label "<input type='hidden' name='__csrf_token' value='$::__csrf_token'>"
}
set sortable false
append finaljs [subst {
document.getElementById('$subid').addEventListener('click', function (event) {
acs_ListCheckAll('objects', this.checked);
}, false);
}]
} else {
set label [lang::util::localize [$field label]]
set sortable [expr {[$field exists sortable] ? [$field set sortable] : true}]
}
lappend js_fields " \{ key: \"[$field set name]\" , sortable: $sortable, label: \"$label\" \}"
}
append js [join $js_fields ", "] "\];\n"
append js "var $datatable = new YAHOO.widget.DataTable('$container', $coldef, $datasource);\n"
append js $finaljs
return $js
}
::xo::Table::YUIDataTableRenderer instproc render-body {} {
html::thead {
html::tr -class list-header {
foreach o [[self]::__columns children] {
if {[$o hide]} continue
$o render
}
}
}
set children [:children]
html::tbody {
foreach line [:children] {
html::tr -class [expr {[incr :__rowcount]%2 ? ${:css.tr.odd-class} : ${:css.tr.even-class} }] {
foreach field [[self]::__columns children] {
if {[$field hide]} continue
html::td [concat [list class [concat list [$field CSSclass]]] [$field html]] {
$field render-data $line
}
}
}
}
}
}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer superclass ::xo::Table::TABLE3
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3::ImageField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE3::ImageField superclass ::xo::Table::TABLE::ImageField
::nsf::object::alloc ::xotcl::Class ::xo::Table::AnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::AnchorField instproc get-slots {} {
set slots [list -${:name}]
foreach subfield {href title CSSclass} {
lappend slots [list -${:name}.$subfield ""]
}
return $slots
}
::nsf::relation::set ::xo::Table::AnchorField superclass ::xo::Table::Field
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::TABLE::BulkAction::slot::CSSclass {set :accessor public
set :configurable true
set :convert false
set :default {}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::TABLE::BulkAction
set :incremental 0
set :manager ::xo::Table::TABLE::BulkAction::slot::CSSclass
set :methodname CSSclass
set :multiplicity 1..1
set :name CSSclass
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3::AnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE3::AnchorField superclass ::xo::Table::TABLE::AnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::HiddenField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::HiddenField instproc get-slots {} {
return [list -${:name}]
}
::nsf::relation::set ::xo::Table::HiddenField superclass ::xo::Table::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2::ImageAnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE2::ImageAnchorField superclass ::xo::Table::TABLE::ImageAnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2::ImageField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE2::ImageField superclass ::xo::Table::TABLE::ImageField
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer::ImageAnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer::ImageAnchorField superclass ::xo::Table::TABLE::ImageAnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer::Field {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer::Field superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE3::BulkAction {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE3::BulkAction superclass ::xo::Table::TABLE::BulkAction
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer::BulkAction {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer::BulkAction superclass ::xo::Table::TABLE::BulkAction
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer::AnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::YUIDataTableRenderer::AnchorField instproc render-data line {
set __name ${:name}
if {[$line exists $__name.href] &&
[set href [$line set $__name.href]] ne ""} {
set CSSclass ${:CSSclass}
if {[$line exists $__name.CSSclass]} {
set lineCSSclass [$line set $__name.CSSclass]
if {$lineCSSclass ne ""} {
append CSSclass " " $lineCSSclass
}
}
$line instvar [list $__name.title title] [list $__name.target target] [list $__name.onclick onclick]
html::a [:get_local_attributes href title {CSSclass class} target onclick] {
return "[next]"
}
}
next
}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer::AnchorField superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer::AnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::BootstrapTableRenderer::AnchorField instproc render-data line {
set __name ${:name}
if {[$line exists $__name.href]
&& [set href [$line set $__name.href]] ne ""
} {
$line instvar [list $__name.title title] [list $__name.target target]
if {[$line exists $__name.onclick]} {
set id [::xowiki::Includelet html_id $line]
template::add_event_listener -id $id -script "[$line set $__name.onclick];"
}
set CSSclass ${:CSSclass}
if {[$line exists $__name.CSSclass]} {
set lineCSSclass [$line set $__name.CSSclass]
if {$lineCSSclass ne ""} {
append CSSclass " " $lineCSSclass
}
}
html::a [:get_local_attributes href title {CSSclass class} target id] {
return [next]
}
}
next
}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer::AnchorField superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer::ImageField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer::ImageField superclass ::xo::Table::TABLE::ImageField
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer::Field {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer::Field superclass ::xo::Table::TABLE::Field
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer::Action {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer::Action superclass ::xo::Table::TABLE::Action
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer::Action {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer::Action superclass ::xo::Table::TABLE::Action
::nx::slotObj -container slot ::xo::Table::ImageField
::xo::Table::ImageField::slot eval {set :__parameter {src width height border title alt}}
::nsf::object::alloc ::xotcl::Class ::xo::Table::TABLE2::BulkAction {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::TABLE2::BulkAction superclass ::xo::Table::TABLE::BulkAction
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer::HiddenField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer::HiddenField superclass ::xo::Table::TABLE::HiddenField
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer::BulkAction {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer::BulkAction superclass ::xo::Table::TABLE::BulkAction
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer::HiddenField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer::HiddenField superclass ::xo::Table::TABLE::HiddenField
::nsf::object::alloc ::xotcl::Class ::xo::Table::YUIDataTableRenderer::ImageAnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::YUIDataTableRenderer::ImageAnchorField superclass ::xo::Table::TABLE::ImageAnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::BootstrapTableRenderer::ImageField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::nsf::relation::set ::xo::Table::BootstrapTableRenderer::ImageField superclass ::xo::Table::TABLE::ImageField
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField::slot::width {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField
set :incremental 0
set :manager ::xo::Table::ImageField::slot::width
set :methodname width
set :multiplicity 1..1
set :name width
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField::slot::height {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField
set :incremental 0
set :manager ::xo::Table::ImageField::slot::height
set :methodname height
set :multiplicity 1..1
set :name height
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField::slot::src {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField
set :incremental 0
set :manager ::xo::Table::ImageField::slot::src
set :methodname src
set :multiplicity 1..1
set :name src
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField::slot::title {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField
set :incremental 0
set :manager ::xo::Table::ImageField::slot::title
set :methodname title
set :multiplicity 1..1
set :name title
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField::slot::border {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField
set :incremental 0
set :manager ::xo::Table::ImageField::slot::border
set :methodname border
set :multiplicity 1..1
set :name border
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField::slot::alt {set :accessor public
set :configurable true
set :convert false
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField
set :incremental 0
set :manager ::xo::Table::ImageField::slot::alt
set :methodname alt
set :multiplicity 1..1
set :name alt
set :per-object false
set :position 0
set :required false
set :trace none
: init}
::nsf::object::alloc ::xotcl::Class ::xo::Table::ImageAnchorField {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::ImageAnchorField instproc get-slots {} {
return [concat [next] -${:name}.href ""]
}
::nsf::relation::set ::xo::Table::ImageAnchorField superclass ::xo::Table::ImageField
::nsf::object::alloc ::xotcl::Class ::xo::Table::ImageField_EditIcon {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::ImageField_EditIcon instparametercmd width
::xo::Table::ImageField_EditIcon instparametercmd src
::xo::Table::ImageField_EditIcon instparametercmd height
::xo::Table::ImageField_EditIcon instparametercmd alt
::xo::Table::ImageField_EditIcon instparametercmd border
::xo::Table::ImageField_EditIcon instparametercmd title
::nsf::relation::set ::xo::Table::ImageField_EditIcon superclass ::xo::Table::ImageAnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::ImageField_AddIcon {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::ImageField_AddIcon instparametercmd width
::xo::Table::ImageField_AddIcon instparametercmd src
::xo::Table::ImageField_AddIcon instparametercmd alt
::xo::Table::ImageField_AddIcon instparametercmd height
::xo::Table::ImageField_AddIcon instparametercmd border
::xo::Table::ImageField_AddIcon instparametercmd title
::nsf::relation::set ::xo::Table::ImageField_AddIcon superclass ::xo::Table::ImageAnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::ImageField_DeleteIcon {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::ImageField_DeleteIcon instparametercmd width
::xo::Table::ImageField_DeleteIcon instparametercmd src
::xo::Table::ImageField_DeleteIcon instparametercmd height
::xo::Table::ImageField_DeleteIcon instparametercmd alt
::xo::Table::ImageField_DeleteIcon instparametercmd border
::xo::Table::ImageField_DeleteIcon instparametercmd title
::nsf::relation::set ::xo::Table::ImageField_DeleteIcon superclass ::xo::Table::ImageAnchorField
::nsf::object::alloc ::xotcl::Class ::xo::Table::ImageField_ViewIcon {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object}
::xo::Table::ImageField_ViewIcon instparametercmd src
::xo::Table::ImageField_ViewIcon instparametercmd width
::xo::Table::ImageField_ViewIcon instparametercmd height
::xo::Table::ImageField_ViewIcon instparametercmd alt
::xo::Table::ImageField_ViewIcon instparametercmd border
::xo::Table::ImageField_ViewIcon instparametercmd title
::nsf::relation::set ::xo::Table::ImageField_ViewIcon superclass ::xo::Table::ImageAnchorField
::nx::slotObj -container slot ::xo::Table::ImageField_DeleteIcon
::xo::Table::ImageField_DeleteIcon::slot eval {set :__parameter {
{src /resources/acs-subsite/Delete16.gif} {width 16} {height 16} {border 0}
{title "[_ xotcl-core.delete_item]"} {alt "delete"}
}}
::nx::slotObj -container slot ::xo::Table::ImageField_EditIcon
::xo::Table::ImageField_EditIcon::slot eval {set :__parameter {
{src /resources/acs-subsite/Edit16.gif} {width 16} {height 16} {border 0}
{title "[_ xotcl-core.edit_item]"} {alt "edit"}
}}
::nx::slotObj -container slot ::xo::Table::ImageField_AddIcon
::xo::Table::ImageField_AddIcon::slot eval {set :__parameter {
{src /resources/acs-subsite/Add16.gif} {width 16} {height 16} {border 0}
{title "[_ xotcl-core.add_item]"} {alt "add"}
}}
::nx::slotObj -container slot ::xo::Table::ImageField_ViewIcon
::xo::Table::ImageField_ViewIcon::slot eval {set :__parameter {
{src /resources/acs-subsite/Zoom16.gif} {width 16} {height 16} {border 0}
{title "[_ xotcl-core.view_item]"} {alt "view"}
}}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_ViewIcon::slot::alt {set :accessor public
set :configurable true
set :convert false
set :default view
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_ViewIcon
set :incremental 0
set :manager ::xo::Table::ImageField_ViewIcon::slot::alt
set :methodname alt
set :multiplicity 1..1
set :name alt
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_AddIcon::slot::height {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_AddIcon
set :incremental 0
set :manager ::xo::Table::ImageField_AddIcon::slot::height
set :methodname height
set :multiplicity 1..1
set :name height
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_DeleteIcon::slot::width {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_DeleteIcon
set :incremental 0
set :manager ::xo::Table::ImageField_DeleteIcon::slot::width
set :methodname width
set :multiplicity 1..1
set :name width
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_EditIcon::slot::alt {set :accessor public
set :configurable true
set :convert false
set :default edit
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_EditIcon
set :incremental 0
set :manager ::xo::Table::ImageField_EditIcon::slot::alt
set :methodname alt
set :multiplicity 1..1
set :name alt
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_DeleteIcon::slot::border {set :accessor public
set :configurable true
set :convert false
set :default 0
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_DeleteIcon
set :incremental 0
set :manager ::xo::Table::ImageField_DeleteIcon::slot::border
set :methodname border
set :multiplicity 1..1
set :name border
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_EditIcon::slot::border {set :accessor public
set :configurable true
set :convert false
set :default 0
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_EditIcon
set :incremental 0
set :manager ::xo::Table::ImageField_EditIcon::slot::border
set :methodname border
set :multiplicity 1..1
set :name border
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_DeleteIcon::slot::alt {set :accessor public
set :configurable true
set :convert false
set :default delete
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_DeleteIcon
set :incremental 0
set :manager ::xo::Table::ImageField_DeleteIcon::slot::alt
set :methodname alt
set :multiplicity 1..1
set :name alt
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_EditIcon::slot::title {set :accessor public
set :configurable true
set :convert false
set :default {[_ xotcl-core.edit_item]}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_EditIcon
set :incremental 0
set :manager ::xo::Table::ImageField_EditIcon::slot::title
set :methodname title
set :multiplicity 1..1
set :name title
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_ViewIcon::slot::src {set :accessor public
set :configurable true
set :convert false
set :default /resources/acs-subsite/Zoom16.gif
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_ViewIcon
set :incremental 0
set :manager ::xo::Table::ImageField_ViewIcon::slot::src
set :methodname src
set :multiplicity 1..1
set :name src
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_AddIcon::slot::title {set :accessor public
set :configurable true
set :convert false
set :default {[_ xotcl-core.add_item]}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_AddIcon
set :incremental 0
set :manager ::xo::Table::ImageField_AddIcon::slot::title
set :methodname title
set :multiplicity 1..1
set :name title
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_ViewIcon::slot::height {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_ViewIcon
set :incremental 0
set :manager ::xo::Table::ImageField_ViewIcon::slot::height
set :methodname height
set :multiplicity 1..1
set :name height
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_ViewIcon::slot::title {set :accessor public
set :configurable true
set :convert false
set :default {[_ xotcl-core.view_item]}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_ViewIcon
set :incremental 0
set :manager ::xo::Table::ImageField_ViewIcon::slot::title
set :methodname title
set :multiplicity 1..1
set :name title
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_AddIcon::slot::alt {set :accessor public
set :configurable true
set :convert false
set :default add
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_AddIcon
set :incremental 0
set :manager ::xo::Table::ImageField_AddIcon::slot::alt
set :methodname alt
set :multiplicity 1..1
set :name alt
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_EditIcon::slot::src {set :accessor public
set :configurable true
set :convert false
set :default /resources/acs-subsite/Edit16.gif
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_EditIcon
set :incremental 0
set :manager ::xo::Table::ImageField_EditIcon::slot::src
set :methodname src
set :multiplicity 1..1
set :name src
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_DeleteIcon::slot::src {set :accessor public
set :configurable true
set :convert false
set :default /resources/acs-subsite/Delete16.gif
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_DeleteIcon
set :incremental 0
set :manager ::xo::Table::ImageField_DeleteIcon::slot::src
set :methodname src
set :multiplicity 1..1
set :name src
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_DeleteIcon::slot::height {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_DeleteIcon
set :incremental 0
set :manager ::xo::Table::ImageField_DeleteIcon::slot::height
set :methodname height
set :multiplicity 1..1
set :name height
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_DeleteIcon::slot::title {set :accessor public
set :configurable true
set :convert false
set :default {[_ xotcl-core.delete_item]}
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_DeleteIcon
set :incremental 0
set :manager ::xo::Table::ImageField_DeleteIcon::slot::title
set :methodname title
set :multiplicity 1..1
set :name title
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_EditIcon::slot::height {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_EditIcon
set :incremental 0
set :manager ::xo::Table::ImageField_EditIcon::slot::height
set :methodname height
set :multiplicity 1..1
set :name height
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_AddIcon::slot::border {set :accessor public
set :configurable true
set :convert false
set :default 0
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_AddIcon
set :incremental 0
set :manager ::xo::Table::ImageField_AddIcon::slot::border
set :methodname border
set :multiplicity 1..1
set :name border
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_EditIcon::slot::width {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_EditIcon
set :incremental 0
set :manager ::xo::Table::ImageField_EditIcon::slot::width
set :methodname width
set :multiplicity 1..1
set :name width
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_AddIcon::slot::src {set :accessor public
set :configurable true
set :convert false
set :default /resources/acs-subsite/Add16.gif
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_AddIcon
set :incremental 0
set :manager ::xo::Table::ImageField_AddIcon::slot::src
set :methodname src
set :multiplicity 1..1
set :name src
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_AddIcon::slot::width {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_AddIcon
set :incremental 0
set :manager ::xo::Table::ImageField_AddIcon::slot::width
set :methodname width
set :multiplicity 1..1
set :name width
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_ViewIcon::slot::width {set :accessor public
set :configurable true
set :convert false
set :default 16
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_ViewIcon
set :incremental 0
set :manager ::xo::Table::ImageField_ViewIcon::slot::width
set :methodname width
set :multiplicity 1..1
set :name width
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
::nsf::object::alloc ::xotcl::Attribute ::xo::Table::ImageField_ViewIcon::slot::border {set :accessor public
set :configurable true
set :convert false
set :default 0
set :defaultmethods {}
set :disposition alias
set :domain ::xo::Table::ImageField_ViewIcon
set :incremental 0
set :manager ::xo::Table::ImageField_ViewIcon::slot::border
set :methodname border
set :multiplicity 1..1
set :name border
set :per-object false
set :position 0
set :required false
set :substdefault 0b111
set :trace none
: init}
namespace eval ::xo::Table {::namespace export Field AnchorField HiddenField Action ImageField ImageAnchorField ImageField_EditIcon ImageField_ViewIcon ImageField_DeleteIcon ImageField_AddIcon BulkAction}
XQL Not present:Generic, PostgreSQL, Oracle
[
hide source ]
| [
make this the default ]