def init(self): WebContainer.register_cmd("pyasm.widget.AnnotateCbk") sobject = self.get_current_sobject() if not sobject: if not self.__dict__.has_key("search_type"): web = WebContainer.get_web() self.search_type = web.get_form_value("search_type") self.search_id = web.get_form_value("search_id") if not self.search_type: self.add("No search type") return search = Search(self.search_type) search.add_id_filter(self.search_id) sobject = search.get_sobject() self.add("<h3>Design Review: Annotation</h3>") table = TableWdg(self.search_type) table.set_sobject(sobject) self.add(table) url = WebContainer.get_web().get_widget_url() url.set_option("widget", "AnnotateWdg") url.set_option("search_type", self.search_type) url.set_option("search_id", self.search_id) src = url.to_string() self.add("<h3>Click on image to add an annotation</h3>") self.add( "The annotation will be located where you clicked on the image") self.add(""" <iframe id="annotate_frame" scrolling="no" src="%s" style='width: 800; height: 450; margin-left: 30px; border: none;"> WARNING: iframes are not supported </iframe> """ % src)