#set( $viewtype = $detail.searchcomponent )
#if (!$viewtype)
#set( $viewtype = $detail.viewType )
#end
#if (!$viewtype)
#set ($viewtype = $detail.dataType)
#end
#if (!$viewtype || $viewtype == "text")
#set ($viewtype = "default")
#end
#if (!$viewtype || $viewtype == "date")
#set ($viewtype = "datesearch")
#end
#if (!$viewtype || $viewtype == "textarea" || $viewtype == "html")
#set ($viewtype = "default")
#end
#if (!$viewtype || $viewtype == "boolean")
#set ($viewtype = "booleansearch")
#end
#if(!$detail.isDate() && $detail.getId() != "category" && !$viewtype.endsWith("search") )
#if($detail.defaultoperation && $detail.defaultoperation != "")
#elseif($detail.isList() || $detail.isBoolean() || $viewtype == "multiselect")
#else
#end
#end
#if( $hits.getSearchQuery() )
#set( $value = "$!hits.getSearchQuery().getInput($detail.id)" )
#set( $values = "$!hits.getSearchQuery().getInputs($detail.id)" )
#set( $term = $hits.getSearchQuery().getTermByDetailId($detail.id) )
$context.putPageValue("term",$term)
$context.putPageValue("val",$value)
$context.putPageValue("values",$values)
#end
$context.putPageValue("inlinelabels",true)
$context.putPageValue("caneditlists",false)
$pages.include("/${applicationid}/components/xml/types/${viewtype}.html", $context)