def tree
@doTree = false
if SchemaType.count < 1
flash[:error] = "Sorry, you have not added any entries to the metadata.schema_types table. There must be at least one schema_type, and each schema must have a schema_type_id for it to be visible in the Metadata browser. "
else
@database = Database.find_by_database_nm(Database.find_first.currentDatabaseName)
@schema_types = SchemaType.find(:all, :order => "display_seq")
@schemas = Schema.find (:all, :conditions => "database_id = #{@database.id}", :order => "schema_nm")
@doTree = true
end
render :layout => 'tree'
end