I just copied this code from ProductCreateHandler. Maybe this is used by the javascripts in the site ?