parameters: (self)
return_statement: return content
docstring: this method is called thru ajax
docstring_summary: this method is called thru ajax
docstring_tokens: this method is called thru ajax
function: def _get_sobject_wdg(self):
          ''' this method is called thru ajax '''
          args = WebContainer.get_web().get_form_args()
          
          # get the args in the URL
          search_type = args['search_type']
          sobj_search_type = args['sobj_search_type']
          search_id = args['search_id']
          view = args['view']
          sobject = Search.get_by_id(sobj_search_type, search_id)
  
          content = Widget()
          table = TableWdg(search_type, view, css='table')
          table.set_show_property(False)
          content.add(table)
          content.add(HtmlElement.br(2))
  
          search = self._get_sobject_search(sobject, search_type)
             
          sobjects = search.get_sobjects()
          if search_type.startswith("sthpw/note"):
              # this assumes that a project has submission!
              from pyasm.prod.biz import Submission
              from pyasm.search import SqlException
              try:
                  notes = Submission.get_all_notes(sobject)
                  sobjects.extend( notes )
              except SqlException:
                  pass
  
              def compare(x,y):
                  return cmp( y.get_value("timestamp"), x.get_value("timestamp") )
  
              sobjects.sort(cmp=compare)
  
          table.set_search(search)
          table.set_sobjects(sobjects)
          return content
function_tokens: def _get_sobject_wdg ( self ) : args = WebContainer . get_web ( ) . get_form_args ( ) # get the args in the URL search_type = args [ 'search_type' ] sobj_search_type = args [ 'sobj_search_type' ] search_id = args [ 'search_id' ] view = args [ 'view' ] sobject = Search . get_by_id ( sobj_search_type , search_id ) content = Widget ( ) table = TableWdg ( search_type , view , css = 'table' ) table . set_show_property ( False ) content . add ( table ) content . add ( HtmlElement . br ( 2 ) ) search = self . _get_sobject_search ( sobject , search_type ) sobjects = search . get_sobjects ( ) if search_type . startswith ( "sthpw/note" ) : # this assumes that a project has submission! from pyasm . prod . biz import Submission from pyasm . search import SqlException try : notes = Submission . get_all_notes ( sobject ) sobjects . extend ( notes ) except SqlException : pass def compare ( x , y ) : return cmp ( y . get_value ( "timestamp" ) , x . get_value ( "timestamp" ) ) sobjects . sort ( cmp = compare ) table . set_search ( search ) table . set_sobjects ( sobjects ) return content