Esempio n. 1
0
 /**
  * Instantiates a new form that wraps the specified class.
  *
  * @deprecated inject a {@link FormFactory} instead, since 2.5.0
  */
 @Deprecated
 public static <T> Form<T> form(Class<T> clazz) {
   return new Form<>(
       clazz,
       play.api.Play.current().injector().instanceOf(MessagesApi.class),
       play.api.Play.current().injector().instanceOf(Formatters.class));
 }
Esempio n. 2
0
 /**
  * Instantiates a new form that wraps the specified class.
  *
  * @deprecated inject a {@link FormFactory} instead, since 2.5.0
  */
 @Deprecated
 public static <T> Form<T> form(String name, Class<T> clazz, Class<?> group) {
   return new Form<>(
       name,
       clazz,
       group,
       play.api.Play.current().injector().instanceOf(MessagesApi.class),
       play.api.Play.current().injector().instanceOf(Formatters.class));
 }
Esempio n. 3
0
 /**
  * Instantiates a dynamic form.
  *
  * @deprecated inject a {@link FormFactory} instead, since 2.5.0
  */
 @Deprecated
 public static DynamicForm form() {
   return new DynamicForm(
       play.api.Play.current().injector().instanceOf(MessagesApi.class),
       play.api.Play.current().injector().instanceOf(Formatters.class));
 }
Esempio n. 4
0
 /** Returns `true` if the current application is `DEV` mode. */
 private static boolean isDev() {
   return play.api.Play.isDev(play.api.Play.current());
 }