Пример #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));
 }
Пример #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));
 }
Пример #3
0
 /** Stops an application. */
 public static void stop(FakeApplication fakeApplication) {
   play.api.Play.stop();
 }
Пример #4
0
  /** Starts a new application. */
  public static void start(FakeApplication fakeApplication) {

    play.api.Play.start(fakeApplication.getWrappedApplication());
  }
Пример #5
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));
 }
Пример #6
0
 /** Stops an application. */
 public static void stop(Application application) {
   play.api.Play.stop(application.getWrappedApplication());
 }