Changeset 5360


Ignore:
Timestamp:
05/06/09 13:32:12 (10 years ago)
Author:
domlowe
Message:

Now clears out old endpoints upon reload

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/cowsclient/controllers/wmsviz.py

    r5356 r5360  
    5959                 
    6060        if ('ENDPOINT' in self.inputs): 
    61             log.info('endpoint') 
    62          
    63             urlstring=str(self.inputs['ENDPOINT']) 
     61            #clear out old endpoints NOTE. this means only one endpoint at a time can be viewed. May want to 
     62        #rethink this to enable 'shopping cart' type selection.  
     63            self.removeAllViewItems() 
     64            urlstring=str(self.inputs['ENDPOINT']) 
    6465            req = urllib2.Request(urlstring) 
    6566            req.add_header('Cookie', request.headers.get('Cookie', '')) 
     
    111112                     
    112113        session['viewItems'] = selections 
    113         session.save()  #TODO, why won't session save? 
     114        session.save()   
    114115         
    115116     
     
    131132        else: 
    132133            session['viewItems'] = selections 
    133  
    134134        session.save() 
    135135         
     136    def removeAllViewItems(self): 
     137        """ 
     138        Remove all old view items - clears out old endpoints  
     139        """ 
     140        session['viewItems']=[] 
     141        session.save() 
Note: See TracChangeset for help on using the changeset viewer.