ATWF A Tcl Web Framwork

Check-in [b6c4ac9ed0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:initial version

git-svn-id: https://atwf.svn.sourceforge.net/svnroot/atwf@616 3ddb7fe1-eb8e-4980-8f37-d9e37380b5db

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b6c4ac9ed00719127926f53251326ff87ea23a9f
User & Date: arnulf@wiedemann-pri.de 2010-12-12 12:43:21
Context
2010-12-12
12:44
initial version

git-svn-id: https://atwf.svn.sourceforge.net/svnroot/atwf@617 3ddb7fe1-eb8e-4980-8f37-d9e37380b5db check-in: 0332630cd2 user: arnulf@wiedemann-pri.de tags: trunk

12:43
initial version

git-svn-id: https://atwf.svn.sourceforge.net/svnroot/atwf@616 3ddb7fe1-eb8e-4980-8f37-d9e37380b5db check-in: b6c4ac9ed0 user: arnulf@wiedemann-pri.de tags: trunk

2010-12-05
18:43
fixes for application and added test_apptool directory

git-svn-id: https://atwf.svn.sourceforge.net/svnroot/atwf@615 3ddb7fe1-eb8e-4980-8f37-d9e37380b5db check-in: 8dd8c9b485 user: arnulf@wiedemann-pri.de tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added application/modules/AppTool/Bootstrap.tcl.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
::itcl::extendedclass ::Apptool::Bootstrap {
    inherit ::ATWF::Applications::Modules::Bootstrap

    constructor {application {classPath {}}} {
        chain $application $classPath
    } {
    }
}

Added application/modules/AppTool/ClientFiles/start.tcl_src.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
<elements>
  <element>
<line># this is the start.tcl_src file</line>
  </element>
  <element>
<line># this is the second line</line>
  </element>
</elements>

Added application/modules/AppTool/controllers/ClientController.tcl.













































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
namespace eval ::ATWF {

::itcl::class Apptool::ClientController {
    inherit ::ATWF::Controllers::Action

    private variable _objects_to_delete [list]
    private variable _request
    private variable _response


    constructor {request response {invokeArgs {}}} {
        set _request $request
	set _response $response
        chain $request $response $invokeArgs
    } {
    }

    public method init {}
    public method getfileAction {}
    public method getoptionsAction {}
    public method postDispatch {}
    public method render {{action {}} {name {}} {noController false}}
    public method renderScript {script {name {}}}
    public method run {{request {}} {response {}}}
    public method dispatch {action}

}

::itcl::body Apptool::ClientController::constructor {request response {invokeArgs {}}} {
}

::itcl::body Apptool::ClientController::init {} {
    # switch output to xml
    set contextSwitch [$_helper getHelper ContextSwitch]
    $contextSwitch addActionContext getfile xml
    $contextSwitch addActionContext getoptions xml
    $contextSwitch initContext
}

::itcl::body Apptool::ClientController::getfileAction {} {
puts stderr "getfileAction!"
    $view VarSet request_params [$_request getParams]
}

::itcl::body Apptool::ClientController::getoptionsAction {} {
if {[catch {
    set people_obj [uplevel #0 ::Apptool::Models::DbTables::People #auto]
    lappend _objects_to_delete $people_obj
    set rows [$people_obj getRows [list "id > ?" 27 "ID < ? " 100]]
    lappend _objects_to_delete $rows
    $view VarSet var1 "hallo Arnulf!"
    if {$rows ne ""} {
        $view VarSet rows $rows
    }
} msg]} {
    puts stderr "MSG![self class]![self method]!$msg!<br>"
}
}

::itcl::body Apptool::ClientController::postDispatch {} {
#puts stderr "_objects_to_delete!$_objects_to_delete!"
    chain
}

::itcl::body Apptool::ClientController::render {{action {}} {name {}} {noController false}} {
#puts stderr "ClientController::render!"
    chain $action $name $noController
}

::itcl::body Apptool::ClientController::renderScript {script {name {}}} {
#puts stderr "ClientController::renderScript!"
    chain $script $name
}

::itcl::body Apptool::ClientController::run {{request {}} {response {}}} {
#puts stderr "ClientController::run!"
    chain $request $response
}

::itcl::body Apptool::ClientController::dispatch {action} {
#puts stderr "ClientController::dispatch!$action!"
    chain $action
#puts stderr "ClientController::dispatch!$action!end!$_objects_to_delete!"
}

}

Added application/modules/AppTool/models/DbTable/People.tcl.





































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#*************************************************************************
#*
#*  last change: $Author$ $Date$
#*
#*  The Contents of this file are made available subject to the terms of
#*  the following license
#*
#* 	- BSD License
#*
#*	see file license.terms in the home directory
#*
#*  Copyright 2009 Arnulf Wiedemann
#*
#*  Author: Arnulf Wiedemann
#*
#*  Contributor(s): 
#*
#************************************************************************/

::itcl::extendedclass ::Apptool::Models::DbTables::People {
    inherit ::ATWF::Dbs::Table

    constructor {} {
        set _name people
	chain
    } {
    }

    public method getRows {where} {
         return [fetchAll $where]
    }
}


Added application/modules/AppTool/models/DbTable/tclIndex.



















>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
# Tcl autoload index file, version 2.0
# This file is generated by the "auto_mkindex" command
# and sourced to set up indexing information for one or
# more commands.  Typically each line is a command that
# sets an element in the auto_index array, where the
# element name is the name of a command and the value is
# a script that loads the command.

set auto_index(::Apptool::Models::DbTables::People) [list source [file join $dir People.tcl]]