Esempio n. 1
0
 def do_POST( self, request ): 
     if not self.init_done:
         self.init_modules( request )
         self.init_done = True                       
     
 	moduleName = getVar( 'mod', request )      
     if moduleName in self.modules:
         self.modules[ moduleName ].perform( request )
Esempio n. 2
0
 def render_main( self, request ):
     if not self.init_done:
         self.init_modules( request )
         self.init_done = True
                                
     moduleName = getVar('mod', request)
     if moduleName not in self.modules:
         request.write( '<p>Please select a module</p>' )
     else:
         module = self.modules[ moduleName ]
         module.write_BODY( request )
Esempio n. 3
0
 def write_BODY( self, request ):
     if not self.__dict__.has_key( "tab" ):
         try:
             self.tab = int( getVar( 'tab', request, 0 ) )
         except:
             self.tab = 0
         
     request.write( "\n<div class='title'>%s</div>" % self.title )
     
     TabView( self.tab, self.tabStrings, self.urlWriter ).write_BODY( request )
     
     try:
         request.write( "\n<div class='tab'>" )
         render_tab = self.tabObjects[ self.tab ]
         render_tab( self.urlWriter ).write_BODY( request )
         request.write( "\n</div>" )
     except Exception, e:
         request.write( "\n<p>Error Rendering Tab</p>" )
         request.write( "\n<p>%s</p>" % str( e ) )
Esempio n. 4
0
    def perform( self, request ):
        request.write( "Tab> perform" )
        request.write( "<br/>op: " + str( getVar( 'op', request ) ) )
        request.write( "<br/>args: " + str( getVar( 'args', request ) ) )
        request.write( "<br/>tab: " + str( getVar( 'tab', request ) ) )      

        try:
            action = getVar( 'op', request, 0 )
            if action == "tab":
                self.tab = int( getVar( 'args', request ) )
            else:
                this.tab = int( getVar( 'tab', request, 0 ) )
                self.tabObjects[ self.tab ]( self.urlWriter ).perform( request )
        except:
            pass