def init(cls, typ, class2type):
        """
        Defines custom fields in the value factory so that the importer can find them
        @param typ
        @param class2type
        """
        field = typ.getField(cls.FIELD_NAME)
        class2type.put( StrStrHashMap , typ )
        typ.setComponentType( StrStrHashMap )
        typ.setImportExportHelper( StrStrHashMapSerializer(typ, field))
        typ.putValidator(field, Validator_object.get(1))
        typ.lock()
def edit_tool_type(request, ttid):
    tool_type = Tool_Type.objects.get(pk=ttid)
    if request.method == 'POST':
        tform = ToolTypeForm(request.POST, instance=tool_type)
        if tform.is_valid():
            tform.save()
            messages.add_message(request,
                                 messages.SUCCESS,
                                 'Tool Type Configuration Successfully Updated.',
                                 extra_tags='alert-success')
            return HttpResponseRedirect(reverse('tool_type', ))
    else:
        tform = ToolTypeForm(instance=tool_type)
    add_breadcrumb(title="Edit Tool Type Configuration", top_level=False, request=request)

    return render(request,
                  'dojo/edit_tool_type.html',
                  {
                      'tform': tform,
                  })