I\'m trying to make a method that takes an argument of Country.class, User.class etc, and returns argument.count().
All the po
Don't fully understand what you are trying to achieve. Did you mean this?
private static long countModel(Model model)
{
return model.count();
}
renderArgs.put("countryCount", countModel(country));
EDIT: If count is a static method, it has nothing to do with model. The static method is not inherited. So all you have to do is to call it directly,
renderArgs.put("countryCount", Country.count());