public static Result update() {
   Map<String, String> map = DynamicForm.form().bindFromRequest().data();
   NewsCategory nc = new NewsCategory();
   nc.category_code = map.get("category_code");
   nc.category_title = map.get("category_title");
   String is_channel = map.get("is_channel");
   nc.parent_category_code = map.get("parent_category_code");
   if (is_channel != null && is_channel.equals("on")) {
     nc.is_channel = true;
   }
   NewsCategory.modifyNewsCategory(nc);
   return redirect("/admin/news/category");
 }
  public static Result create() {
    Map<String, String> map = DynamicForm.form().bindFromRequest().data();
    NewsCategory ac = new NewsCategory();
    ac.category_title = map.get("category_title");
    String is_channel = map.get("is_channel");
    ac.parent_category_code = map.get("parent_category_code");
    System.out.println(ac.parent_category_code);
    if (is_channel != null && is_channel.equals("on")) {
      ac.is_channel = true;
    }
    NewsCategory.createNewsCategory(ac);

    return redirect("/admin/news/category");
  }