def execute(my): # get all of the commands web = WebContainer.get_web() # try the marshalled class marshall_list = [] marshalled = web.get_form_values("marshalled") for marshall in marshalled: # skip duplicated commands if marshall in marshall_list: continue else: marshall_list.append(marshall) marshaller = Marshaller.get_from_marshalled(marshall) cmd = marshaller.get_object() # we want to allow the page to draw, CmdReport will display the error try: Command.execute_cmd(cmd) except TacticException, e: pass except OSError, (errno, strerror): pass
def get_display(my): web = WebContainer.get_web() if web.get_form_value("naming") == "no": my.command_class = "pyasm.prod.web.SingleFilePerSObjectUploadCmd" else: my.command_class = "pyasm.prod.web.SObjectUploadCmd" # add action delegator for this widget cmd_delegator = WebContainer.get_cmd_delegator() marshaller = Marshaller(my.command_class) if web.get_form_value("column") != "": marshaller.set_option("column", web.get_form_value("column") ) cmd_delegator.register_cmd( marshaller ) return super(SObjectUploadWdg,my).get_display()
def get_display(my): web = WebContainer.get_web() if web.get_form_value("naming") == "no": my.command_class = "pyasm.prod.web.SingleFilePerSObjectUploadCmd" else: my.command_class = "pyasm.prod.web.SObjectUploadCmd" # add action delegator for this widget cmd_delegator = WebContainer.get_cmd_delegator() marshaller = Marshaller(my.command_class) if web.get_form_value("column") != "": marshaller.set_option("column", web.get_form_value("column")) cmd_delegator.register_cmd(marshaller) return super(SObjectUploadWdg, my).get_display()