Class ::xowf::Property

::xowf::Property[i] create ... \
           [ -allow_query_parameter (default "false") ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::formfield::FormField[i]
::xotcl::Class create ::xowf::Property \
     -superclass ::xowiki::formfield::FormField

Methods (to be applied on instances)

  • allow_query_parameter (setter)

  • get_default_from (scripted)

    set :parampage $page
    set :default [[:wf_context] get_property -source $page -name ${:name} -default ""]
  • init (scripted)

    #
    # Mostly compatibility fix for XOTcl 2.0. Provide a default
    # property for $object, if the property does not exist in the
    # instance attributes, but provided in the Property definition.
    #
    set object [[:wf_context] object]
    $object instvar instance_attributes
    if {[info exists :default] && ![dict exists $instance_attributes ${:name}]} {
      dict set instance_attributes ${:name} ${:default}
      #:msg "set :default of $object to [:default]"
    }
  • name (setter)

  • wf_context (scripted)

    set max [info level]
    for {set i 0} {$i < $max} {incr i} {
      if {![catch {set s [uplevel $i self]} msg]} {
        set obj [lindex $s 0]
        if {[$obj istype ::xowf::Context]} {
          #:log "$obj [nsf::is object $obj] precedence: [$obj info precedence]"
          return $obj
        }
      }
    }
    
    return [:info parent]