Added getEntityId method, extract ajaxUpdate method.