ATWF A Tcl Web Framwork

Check-in [51b3c34143]
Login

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

Overview
Comment:inital version

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

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:51b3c341439a7e76a8b1bb5796b92e89e5bb1935
User & Date: arnulf@wiedemann-pri.de 2010-12-12 13:01:35
Context
2010-12-12
13:02
fix for keyword

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

13:01
inital version

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

12:45
initial version

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

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added application/modules/AppCommon/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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#*************************************************************************
#*
#*  id: $Id$
#*  URL: $Url: $
#*
#*  lasta change author: $Author$
#*  last changed: $LastChangedDate$
#*
#*  The Contents of this file are made available subject to the terms of
#*  the following license
#*
#*      - BSD License
#*      - Public Domain
#*
#*      see file license.terms in the top directory
#*
#*  Copyright 2008 Arnulf Wiedemann
#*
#*  Author: Arnulf Wiedemann
#*
#*  Contributor(s):
#*
#************************************************************************/
namespace eval ::ATWF {

::itcl::class AppCommon::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 AppCommon::ClientController::constructor {request response {invokeArgs {}}} {
}

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

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

::itcl::body AppCommon::ClientController::getoptionsAction {} {
if {[catch {
    set people_obj [uplevel #0 ::AppCommon::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 AppCommon::ClientController::postDispatch {} {
#puts stderr "_objects_to_delete!$_objects_to_delete!"
    chain
}

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

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

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

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

}