parameters: (self, shot, mode)
return_statement: return widget
docstring: WebContainer.register_cmd(server_cbk)
  
          from pyasm.command import Command
          cmd = eval("%s()" % server_cbk)
          Command.execute_cmd(cmd)
docstring_summary: WebContainer.register_cmd(server_cbk)
docstring_tokens: WebContainer . register_cmd ( server_cbk )
function: def get_shot_set_publish_wdg(self, shot, mode):
          # get session and handle case where there is no session
          widget = Widget()
          session = SessionContents.get()
          if session == None:
              instance_names = []
              asset_codes = []
              node_names = []
          else:
              instance_names = session.get_instance_names()
              asset_codes = session.get_asset_codes()
              node_names = session.get_node_names()
  
          title = HtmlElement.b('Shot Set Publish')
          div = DivWdg(id="shot_set_publish")
          if mode == 'shot_set':
              div.add_style('display: block')
          else:
              div.add_style('display: none')
          div.add(title)
  
         
          button = ProdIconButtonWdg(self.PUBLISH_SET_BUTTON)
          button.add_style('font-size', '1.0em')
          hidden = HiddenWdg(self.PUBLISH_SET_BUTTON, '')
          button.add(hidden)
  
          # custom defined 
          server_cbk = "pyasm.prod.web.ShotSetCheckinCbk"
          exec( Common.get_import_from_class_path(server_cbk) )
          exec( "%s.handle_input(button, self.search_type)" % server_cbk)
  
          # add the command that this button executes
          '''
          WebContainer.register_cmd(server_cbk)
  
          from pyasm.command import Command
          cmd = eval("%s()" % server_cbk)
          Command.execute_cmd(cmd)
          '''
   
  
          table = Table(css="table")
          table.add_row(css='smaller')
          table.add_style('line-height','2.4em') 
          table.add_header("&nbsp;")
          table.add_header("Description")
          
          th = table.add_header(button)
          th.add_style('colspan','3')
          th_end = table.add_header("&nbsp;")
          th_end.add_style('colspan','2')
       
          count = 0
          for i in range(0, len(node_names) ):
              node_name = node_names[i]
              if session.get_node_type(node_name) in ['objectSet'] and \
                  node_name != shot.get_code():
                      self.handle_instance(session, table, node_name, shot)
  
          table.add_row()
          table.add_blank_cell()
          textarea = TextAreaWdg()
          textarea.set_persist_on_submit()
          textarea.set_name("%s_set_description" % shot.get_code())
          textarea.set_attr("cols", "35")
          textarea.set_attr("rows", "3")
          table.add_cell(textarea)
          table.add_blank_cell()
          #table.add_blank_cell()
          table.add_cell( self.get_save_wdg(shot) )
  
  
          div.add(table)
          widget.add(div)
          return widget
function_tokens: def get_shot_set_publish_wdg ( self , shot , mode ) : # get session and handle case where there is no session widget = Widget ( ) session = SessionContents . get ( ) if session == None : instance_names = [ ] asset_codes = [ ] node_names = [ ] else : instance_names = session . get_instance_names ( ) asset_codes = session . get_asset_codes ( ) node_names = session . get_node_names ( ) title = HtmlElement . b ( 'Shot Set Publish' ) div = DivWdg ( id = "shot_set_publish" ) if mode == 'shot_set' : div . add_style ( 'display: block' ) else : div . add_style ( 'display: none' ) div . add ( title ) button = ProdIconButtonWdg ( self . PUBLISH_SET_BUTTON ) button . add_style ( 'font-size' , '1.0em' ) hidden = HiddenWdg ( self . PUBLISH_SET_BUTTON , '' ) button . add ( hidden ) # custom defined  server_cbk = "pyasm.prod.web.ShotSetCheckinCbk" exec ( Common . get_import_from_class_path ( server_cbk ) ) exec ( "%s.handle_input(button, self.search_type)" % server_cbk ) # add the command that this button executes table = Table ( css = "table" ) table . add_row ( css = 'smaller' ) table . add_style ( 'line-height' , '2.4em' ) table . add_header ( "&nbsp;" ) table . add_header ( "Description" ) th = table . add_header ( button ) th . add_style ( 'colspan' , '3' ) th_end = table . add_header ( "&nbsp;" ) th_end . add_style ( 'colspan' , '2' ) count = 0 for i in range ( 0 , len ( node_names ) ) : node_name = node_names [ i ] if session . get_node_type ( node_name ) in [ 'objectSet' ] and node_name != shot . get_code ( ) : self . handle_instance ( session , table , node_name , shot ) table . add_row ( ) table . add_blank_cell ( ) textarea = TextAreaWdg ( ) textarea . set_persist_on_submit ( ) textarea . set_name ( "%s_set_description" % shot . get_code ( ) ) textarea . set_attr ( "cols" , "35" ) textarea . set_attr ( "rows" , "3" ) table . add_cell ( textarea ) table . add_blank_cell ( ) #table.add_blank_cell() table . add_cell ( self . get_save_wdg ( shot ) ) div . add ( table ) widget . add ( div ) return widget