def get_display(self):
    self.filter_search_type = self.get_option('filter_search_type')
    if (not self.filter_search_type):
        self.filter_search_type = self.overall_search_type
    div = DivWdg()
    div.add_style('position: relative')
    if self.show_title:
        name = self.get_name()
        title = self.get_title()
        if (title == None):
            title = name
        title = Common.get_display_title(title)
        if title:
            div.add(('<b>%s: &nbsp;</b>' % title))
    if self.show_title:
        title_div = DivWdg()
        div.add(title_div)
        title_div.add_style('float: left')
        name = self.get_name()
        title = self.get_title()
        if (not title):
            title = name
        title = Common.get_display_title(title)
        title_div.add(('%s:' % title))
        title_div.add_style('width: 80px')
        title_div.add_style('font-weight: bold')
        title_div.add_style('margin-left: 15px')
        title_div.add_style('padding-top: 2px')
    column = None
    hint_text = 'any keywords'
    search_type = 'sthpw/sobject_list'
    if ((not self.columns) and (self.mode in ['keyword', 'keyword_tree'])):
        name = self.get_name()
        self.columns = [name]
        if self.filter_search_type:
            exists = SearchType.column_exists(self.filter_search_type, name)
            if (not exists):
                name = 'name'
                exists = SearchType.column_exists(self.filter_search_type, name)
                if (not exists):
                    name = 'description'
                    exists = SearchType.column_exists(self.filter_search_type, name)
                    if (not exists):
                        raise SetupException(('Keyword Filter column [%s] does not exist' % name))
        self.columns = [name]
    if (self.mode in ['keyword', 'keyword_tree']):
        search_type = self.filter_search_type
        hints = []
        for column in self.columns:
            if (column.find('.') != (- 1)):
                parts = column.split('.')
                hint = parts[(- 1)]
            else:
                hint = column
            hints.append(hint)
        hint_text = ', '.join(hints)
        if (len(hint_text) > 30):
            hint_text = ('%s...' % hint_text[0:29])
    if self.kwargs.get('hint_text'):
        hint_text = self.kwargs.get('hint_text')
    width = self.kwargs.get('width')
    if (not width):
        width = '230px'
    show_toggle = self.get_option('show_toggle')
    if (show_toggle in ['true', True]):
        icon = 'FA_FILTER'
        icon_pos = 'left'
    else:
        icon = ''
        icon_pos = ''
    "\n        custom_cbk = {\n            'enter': '''\n            spt.dg_table.search_cbk( {}, {src_el: bvr.src_el} );\n            '''\n        }\n        "
    text = LookAheadTextInputWdg(name='value', do_search=self.do_search, script_path=self.script_path, filter_search_type=self.filter_search_type, search_type=search_type, column=self.look_ahead_columns, relevant=self.relevant, width=width, height='30px', hint_text=hint_text, case_sensitive=self.case_sensitive, icon=icon, icon_pos=icon_pos)
    value = self.values.get('value')
    if value:
        text.set_value(value)
        text.set_hidden_value(value)
    text.add_behavior({'type': 'keyup', 'cbjs_action': '\n        var key = evt.key;\n        if (key == \'enter\') {\n            var top = bvr.src_el.getParent(".spt_input_text_top");\n            var hidden_el = top.getElement(".spt_text_value");\n            if (bvr.src_el.value) hidden_el.value = bvr.src_el.value;\n            spt.dg_table.search_cbk( {}, {src_el: bvr.src_el} );\n        }\n        '})
    name = self.get_name()
    text.add_behavior({'type': 'change', 'element_name': name, 'cbjs_action': self.get_set_js_action()})
    div.add(text)
    if (self.mode == 'keyword_tree'):
        text.add_style('float', 'left')
        op_select = SelectWdg('cte_op')
        op_select.add_style('width: 100px')
        op_select.set_option('labels', 'keyword|parent|child|both')
        op_select.set_option('values', 'keyword|parent|child|both')
        value = self.values.get('cte_op')
        if value:
            op_select.set_value(value)
        div.add(op_select)
        op_select.add_style('float: left')
        op_select.add_style('margin-left: 10px')
    show_toggle = self.get_option('show_toggle')
    if (show_toggle in ['true', True]):
        icon_wdg = text.get_icon_wdg()
        if icon_wdg:
            icon_wdg.add_class('spt_search_toggle')
            icon_wdg.add_class('hand')
        '\n            from pyasm.widget import IconWdg\n            icon_div = DivWdg()\n            icon = IconWdg("toggle", "BS_CHEVRON_DOWN")\n            icon_div.add(icon)\n            icon_div.add_class("hand spt_search_toggle")\n            icon_div.add_style("position: absolute")\n            icon_div.add_style("top: 6px")\n            icon_div.add_style("right: 4px")\n            div.add(icon_div)\n            '
    show_partial = self.get_option('show_partial')
    if (show_partial in ['true', True]):
        from pyasm.widget import IconWdg
        icon_div = DivWdg()
        icon = IconWdg('Match', IconWdg.ARROWHEAD_DARK_DOWN)
        icon_div.add(icon)
        icon_div.add_class('hand')
        icon_div.add_style('position: absolute')
        icon_div.add_style('top: 5px')
        icon_div.add_style('right: 0')
        from tactic.ui.container import DialogWdg
        dialog = DialogWdg(show_title=False, show_pointer=True)
        dialog.set_as_activator(icon_div, {'x': (- 150), 'y': 10})
        div.add(dialog)
        match_div = DivWdg()
        match_div.add_style('width: 175px')
        dialog.add(match_div)
        checkbox = CheckboxWdg('partial')
        match_div.add(checkbox)
        checkbox.add_attr('title', 'Use partial word match (slower)')
        match_div.add_style('padding: 10px')
        match_div.add_color('color', 'color')
        match_div.add_color('background', 'background')
        match_div.add(' Use partial word match')
        if ((self.mode == 'keyword') and self.has_index):
            div.add(icon_div)
        elif ((self.mode == 'global') and self.has_index):
            div.add(icon_div)
        else:
            hidden = HiddenWdg('partial')
            div.add(hidden)
            hidden.set_value('on')
    return div
def get_display(self):
    self.filter_search_type = self.get_option('filter_search_type')
    if (not self.filter_search_type):
        self.filter_search_type = self.overall_search_type
    div = DivWdg()
    div.add_style('position: relative')
    if self.show_title:
        name = self.get_name()
        title = self.get_title()
        if (title == None):
            title = name
        title = Common.get_display_title(title)
        if title:
            div.add(('<b>%s: &nbsp;</b>' % title))
    if self.show_title:
        title_div = DivWdg()
        div.add(title_div)
        title_div.add_style('float: left')
        name = self.get_name()
        title = self.get_title()
        if (not title):
            title = name
        title = Common.get_display_title(title)
        title_div.add(('%s:' % title))
        title_div.add_style('width: 80px')
        title_div.add_style('font-weight: bold')
        title_div.add_style('margin-left: 15px')
        title_div.add_style('padding-top: 2px')
    column = None
    hint_text = 'any keywords'
    search_type = 'sthpw/sobject_list'
    if ((not self.columns) and (self.mode in ['keyword', 'keyword_tree'])):
        name = self.get_name()
        self.columns = [name]
        if self.filter_search_type:
            exists = SearchType.column_exists(self.filter_search_type, name)
            if (not exists):
                name = 'name'
                exists = SearchType.column_exists(self.filter_search_type, name)
                if (not exists):
                    name = 'description'
                    exists = SearchType.column_exists(self.filter_search_type, name)
                    if (not exists):
                        raise SetupException(('Keyword Filter column [%s] does not exist' % name))
        self.columns = [name]
    if (self.mode in ['keyword', 'keyword_tree']):
        search_type = self.filter_search_type
        hints = []
        for column in self.columns:
            if (column.find('.') != (- 1)):
                parts = column.split('.')
                hint = parts[(- 1)]
            else:
                hint = column
            hints.append(hint)
        hint_text = ', '.join(hints)
        if (len(hint_text) > 30):
            hint_text = ('%s...' % hint_text[0:29])
    if self.kwargs.get('hint_text'):
        hint_text = self.kwargs.get('hint_text')
    width = self.kwargs.get('width')
    if (not width):
        width = '230px'
    show_toggle = self.get_option('show_toggle')
    if (show_toggle in ['true', True]):
        icon = 'FA_FILTER'
        icon_pos = 'left'
    else:
        icon = 
        icon_pos = 
    "\n        custom_cbk = {\n            'enter': '\n            spt.dg_table.search_cbk( {}, {src_el: bvr.src_el} );\n            '\n        }\n        "
    text = LookAheadTextInputWdg(name='value', do_search=self.do_search, script_path=self.script_path, filter_search_type=self.filter_search_type, search_type=search_type, column=self.look_ahead_columns, relevant=self.relevant, width=width, height='30px', hint_text=hint_text, case_sensitive=self.case_sensitive, icon=icon, icon_pos=icon_pos)
    value = self.values.get('value')
    if value:
        text.set_value(value)
        text.set_hidden_value(value)
    text.add_behavior({'type': 'keyup', 'cbjs_action': '\n        var key = evt.key;\n        if (key == \'enter\') {\n            var top = bvr.src_el.getParent(".spt_input_text_top");\n            var hidden_el = top.getElement(".spt_text_value");\n            if (bvr.src_el.value) hidden_el.value = bvr.src_el.value;\n            spt.dg_table.search_cbk( {}, {src_el: bvr.src_el} );\n        }\n        '})
    name = self.get_name()
    text.add_behavior({'type': 'change', 'element_name': name, 'cbjs_action': self.get_set_js_action()})
    div.add(text)
    if (self.mode == 'keyword_tree'):
        text.add_style('float', 'left')
        op_select = SelectWdg('cte_op')
        op_select.add_style('width: 100px')
        op_select.set_option('labels', 'keyword|parent|child|both')
        op_select.set_option('values', 'keyword|parent|child|both')
        value = self.values.get('cte_op')
        if value:
            op_select.set_value(value)
        div.add(op_select)
        op_select.add_style('float: left')
        op_select.add_style('margin-left: 10px')
    show_toggle = self.get_option('show_toggle')
    if (show_toggle in ['true', True]):
        icon_wdg = text.get_icon_wdg()
        if icon_wdg:
            icon_wdg.add_class('spt_search_toggle')
            icon_wdg.add_class('hand')
        '\n            from pyasm.widget import IconWdg\n            icon_div = DivWdg()\n            icon = IconWdg("toggle", "BS_CHEVRON_DOWN")\n            icon_div.add(icon)\n            icon_div.add_class("hand spt_search_toggle")\n            icon_div.add_style("position: absolute")\n            icon_div.add_style("top: 6px")\n            icon_div.add_style("right: 4px")\n            div.add(icon_div)\n            '
    show_partial = self.get_option('show_partial')
    if (show_partial in ['true', True]):
        from pyasm.widget import IconWdg
        icon_div = DivWdg()
        icon = IconWdg('Match', IconWdg.ARROWHEAD_DARK_DOWN)
        icon_div.add(icon)
        icon_div.add_class('hand')
        icon_div.add_style('position: absolute')
        icon_div.add_style('top: 5px')
        icon_div.add_style('right: 0')
        from tactic.ui.container import DialogWdg
        dialog = DialogWdg(show_title=False, show_pointer=True)
        dialog.set_as_activator(icon_div, {'x': (- 150), 'y': 10})
        div.add(dialog)
        match_div = DivWdg()
        match_div.add_style('width: 175px')
        dialog.add(match_div)
        checkbox = CheckboxWdg('partial')
        match_div.add(checkbox)
        checkbox.add_attr('title', 'Use partial word match (slower)')
        match_div.add_style('padding: 10px')
        match_div.add_color('color', 'color')
        match_div.add_color('background', 'background')
        match_div.add(' Use partial word match')
        if ((self.mode == 'keyword') and self.has_index):
            div.add(icon_div)
        elif ((self.mode == 'global') and self.has_index):
            div.add(icon_div)
        else:
            hidden = HiddenWdg('partial')
            div.add(hidden)
            hidden.set_value('on')
    return div