Changeset 485

Show
Ignore:
Timestamp:
10/06/10 07:50:35 (8 years ago)
Author:
samuraraujo
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Explorator/trunk/app/controllers/explorator_controller.rb

    r472 r485  
    1616  #default rails method. returns the view index.rhtml. 
    1717  def index 
    18    
     18    if params[:url] != nil 
     19       
     20      begin       
     21         
     22        #creates a new set.  
     23        #the expression must be passed by the uri 
     24         
     25        set = EXPLORATOR::Set.new('http://www.tecweb.inf.puc-rio.br/resourceset/id/' + UUID.random_create.to_s)        
     26         
     27        set.init("SemanticExpression.new.go('"+ params[:url] +"')") 
     28         
     29        #the object @resourceset is a global object that will be used by render 
     30        @resourceset = set    
     31        view = 'subject_view'   
     32         
     33        #render the _window.rhtml view 
     34        render :partial => view,:layout=>true 
     35         
     36      rescue Exception => e 
     37        puts e.backtrace 
     38        redirect_to :controller => 'message',:action => 'error',:message => e.message ,:layout => true 
     39      end 
     40    end 
    1941     
    2042  end