当前位置: 首页>>代码示例>>Java>>正文


Java FormFactory类代码示例

本文整理汇总了Java中play.data.FormFactory的典型用法代码示例。如果您正苦于以下问题:Java FormFactory类的具体用法?Java FormFactory怎么用?Java FormFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FormFactory类属于play.data包,在下文中一共展示了FormFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MyStupidBasicAuthProvider

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public MyStupidBasicAuthProvider(final PlayAuthenticate auth, final UserProvider userProvider,
								 final FormFactory formFactory,
								 final ApplicationLifecycle lifecycle) {
	super(auth, lifecycle);
	this.userProvider = userProvider;
	this.LOGIN_FORM = formFactory.form(MyUsernamePasswordAuthProvider.MyLogin.class);
}
 
开发者ID:Vadus,项目名称:songs_play,代码行数:9,代码来源:MyStupidBasicAuthProvider.java

示例2: checkIndex

import play.data.FormFactory; //导入依赖的package包/类
@Test
public void checkIndex() {
    // XXX This is a gap in the test API -- it should be play.test.Helpers.httpContext() by 2.6.0-M4
    // and JavaHelpers should be removed.
    Http.RequestBuilder request = Helpers.fakeRequest("GET", "/");

    // XXX This should be play.test.CSRFTokenHelper
    Http.RequestBuilder tokenRequest = play.api.test.CSRFTokenHelper.addCSRFToken(request);
    JavaContextComponents contextComponents = createContextComponents();
    Http.Context.current.set(createJavaContext(tokenRequest.build()._underlyingRequest(), contextComponents));

    PersonRepository repository = mock(PersonRepository.class);
    FormFactory formFactory = mock(FormFactory.class);
    HttpExecutionContext ec = new HttpExecutionContext(ForkJoinPool.commonPool());
    final PersonController controller = new PersonController(formFactory, repository, ec);
    final Result result = controller.index();

    assertThat(result.status()).isEqualTo(OK);
}
 
开发者ID:play2-maven-plugin,项目名称:play2-maven-test-projects,代码行数:20,代码来源:UnitTest.java

示例3: PostController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public PostController(GroupManager groupManager,
                      PostManager postManager,
        PostBookmarkManager postBookmarkManager,
                      AccountManager accountManager,
                      Configuration configuration,
                      FormFactory formFactory,
                      NotificationService notificationService,
                      MessagesApi messagesApi) {
    this.groupManager = groupManager;
    this.postManager = postManager;
    this.postBookmarkManager = postBookmarkManager;
    this.accountManager = accountManager;
    this.configuration = configuration;
    this.formFactory = formFactory;
    this.notificationService = notificationService;
    this.messagesApi = messagesApi;

    this.postForm = formFactory.form(Post.class);
}
 
开发者ID:socia-platform,项目名称:htwplus,代码行数:21,代码来源:PostController.java

示例4: Application

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public Application(ElasticsearchService elasticsearchService,
                   ElasticsearchResponse elasticsearchResponse,
                   GroupManager groupManager,
                   PostManager postManager,
                   AccountManager accountManager,
                   Configuration configuration,
                   FormFactory formFactory,
                   MessagesApi messagesApi) {
    this.elasticsearchService = elasticsearchService;
    this.elasticsearchResponse = elasticsearchResponse;
    this.groupManager = groupManager;
    this. postManager = postManager;
    this.accountManager = accountManager;
    this.configuration = configuration;
    this.messagesApi = messagesApi;
    this.formFactory = formFactory;
    this.postForm = formFactory.form(Post.class);
    this.limit = configuration.getInt("htwplus.post.limit");
}
 
开发者ID:socia-platform,项目名称:htwplus,代码行数:21,代码来源:Application.java

示例5: AdminController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public AdminController(ElasticsearchService elasticsearchService,
                       MediaManager mediaManager,
                       GroupManager groupManager,
                       PostManager postManager,
                       AccountManager accountManager,
                       FolderManager folderManager,
                       FormFactory formFactory,
                       MessagesApi messagesApi) {
    this.elasticsearchService = elasticsearchService;
    this.mediaManager = mediaManager;
    this.groupManager = groupManager;
    this.postManager = postManager;
    this.accountManager = accountManager;
    this.folderManager = folderManager;
    this.messagesApi = messagesApi;
    this.formFactory = formFactory;
    this.accountForm = formFactory.form(Account.class);
    this.postForm =  formFactory.form(Post.class);
}
 
开发者ID:socia-platform,项目名称:htwplus,代码行数:21,代码来源:AdminController.java

示例6: LoginController

import play.data.FormFactory; //导入依赖的package包/类
@Inject 
public LoginController(CidadaoDAO dao, WSClient ws, FormFactory formFactory,
		Configuration configuration, JPAApi api, AuthUtils authenticator) {
	this.dao = dao;
	this.ws = ws;
	this.formFactory = formFactory;
	this.api = api;
	this.authenticator = authenticator;
	this.facebookSecret = configuration.getString(ProvedorDeLogin.FACEBOOK.getSecretProp());
	this.googleSecret = configuration.getString(ProvedorDeLogin.GOOGLE.getSecretProp());
}
 
开发者ID:nazareno,项目名称:diferentonas-server,代码行数:12,代码来源:LoginController.java

示例7: LoginController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public LoginController(FormFactory formFactory, UserRepository userRepository, EventRepository eventRepository, JwtUtils jwtUtils, AuthorizationServerManager authorizationServerManager) {
    this.formFactory = formFactory;
    this.userRepository = userRepository;
    this.eventRepository = eventRepository;
    this.jwtUtils = jwtUtils;
    this.authorizationServerManager = authorizationServerManager;
}
 
开发者ID:bekce,项目名称:oauthly,代码行数:9,代码来源:LoginController.java

示例8: OAuthAuthorizationServerController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public OAuthAuthorizationServerController(FormFactory formFactory, JwtUtils jwtUtils, ClientRepository clientRepository, UserRepository userRepository, GrantRepository grantRepository) {
    this.formFactory = formFactory;
    this.jwtUtils = jwtUtils;
    this.clientRepository = clientRepository;
    this.userRepository = userRepository;
    this.grantRepository = grantRepository;
}
 
开发者ID:bekce,项目名称:oauthly,代码行数:9,代码来源:OAuthAuthorizationServerController.java

示例9: RemoveFromCartController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public RemoveFromCartController(final ContentRenderer contentRenderer,
                                final FormFactory formFactory,
                                final RemoveFromCartFormData formData,
                                final CartFinder cartFinder,
                                final RemoveFromCartControllerAction removeFromCartControllerAction,
                                final CartPageContentFactory cartPageContentFactory,
                                final CartReverseRouter cartReverseRouter) {
    super(contentRenderer, formFactory, formData, cartFinder, removeFromCartControllerAction, cartPageContentFactory);
    this.cartReverseRouter = cartReverseRouter;
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:12,代码来源:RemoveFromCartController.java

示例10: CheckoutAddressController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public CheckoutAddressController(final ContentRenderer contentRenderer,
                                 final FormFactory formFactory,
                                 final CheckoutAddressFormData formData,
                                 final CartFinder cartFinder,
                                 final CheckoutAddressControllerAction controllerAction,
                                 final CheckoutAddressPageContentFactory pageContentFactory,
                                 final CartReverseRouter cartReverseRouter,
                                 final CheckoutReverseRouter checkoutReverseRouter) {
    super(contentRenderer, formFactory, formData, cartFinder, controllerAction, pageContentFactory);
    this.cartReverseRouter = cartReverseRouter;
    this.checkoutReverseRouter = checkoutReverseRouter;
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:14,代码来源:CheckoutAddressController.java

示例11: ChangeQuantityInCartController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public ChangeQuantityInCartController(final ContentRenderer contentRenderer,
                                      final FormFactory formFactory,
                                      final ChangeQuantityInCartFormData formData,
                                      final CartFinder cartFinder,
                                      final CartPageContentFactory pageContentFactory,
                                      final ChangeQuantityInCartControllerAction controllerAction,
                                      final CartReverseRouter cartReverseRouter) {
    super(contentRenderer, formFactory, formData, cartFinder, pageContentFactory, controllerAction);
    this.cartReverseRouter = cartReverseRouter;
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:12,代码来源:ChangeQuantityInCartController.java

示例12: AddToCartController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public AddToCartController(final ContentRenderer contentRenderer,
                           final FormFactory formFactory,
                           final AddToCartFormData formData,
                           final CartFinder cartFinder,
                           final CartCreator cartCreator,
                           final AddToCartControllerAction controllerAction,
                           final CartPageContentFactory pageContentFactory,
                           final CartReverseRouter cartReverseRouter) {
    super(contentRenderer, formFactory, formData, cartFinder, cartCreator, controllerAction, pageContentFactory);
    this.cartReverseRouter = cartReverseRouter;
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:13,代码来源:AddToCartController.java

示例13: CheckoutConfirmationController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public CheckoutConfirmationController(final ContentRenderer contentRenderer,
                                      final FormFactory formFactory,
                                      final CheckoutConfirmationFormData formData,
                                      final CartFinder cartFinder,
                                      final CheckoutConfirmationControllerAction controllerAction,
                                      final CheckoutConfirmationPageContentFactory pageContentFactory,
                                      final CartReverseRouter cartReverseRouter,
                                      final CheckoutReverseRouter checkoutReverseRouter) {
    super(contentRenderer, formFactory, formData, cartFinder, controllerAction, pageContentFactory);
    this.cartReverseRouter = cartReverseRouter;
    this.checkoutReverseRouter = checkoutReverseRouter;
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:14,代码来源:CheckoutConfirmationController.java

示例14: CheckoutPaymentController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public CheckoutPaymentController(final ContentRenderer contentRenderer,
                                 final FormFactory formFactory,
                                 final CheckoutPaymentFormData formData,
                                 final CartFinder cartFinder,
                                 final CheckoutPaymentControllerAction controllerAction,
                                 final CheckoutPaymentPageContentFactory pageContentFactory,
                                 final PaymentSettings paymentSettings,
                                 final CartReverseRouter cartReverseRouter,
                                 final CheckoutReverseRouter checkoutReverseRouter) {
    super(contentRenderer, formFactory, formData, cartFinder, controllerAction, pageContentFactory, paymentSettings);
    this.cartReverseRouter = cartReverseRouter;
    this.checkoutReverseRouter = checkoutReverseRouter;
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:15,代码来源:CheckoutPaymentController.java

示例15: CheckoutShippingController

import play.data.FormFactory; //导入依赖的package包/类
@Inject
public CheckoutShippingController(final ContentRenderer contentRenderer,
                                  final FormFactory formFactory,
                                  final CheckoutShippingFormData formData,
                                  final CartFinder cartFinder,
                                  final CheckoutShippingControllerAction controllerAction,
                                  final CheckoutShippingPageContentFactory pageContentFactory,
                                  final ShippingSettings shippingSettings,
                                  final CartReverseRouter cartReverseRouter,
                                  final CheckoutReverseRouter checkoutReverseRouter) {
    super(contentRenderer, formFactory, formData, cartFinder, controllerAction, pageContentFactory, shippingSettings);
    this.cartReverseRouter = cartReverseRouter;
    this.checkoutReverseRouter = checkoutReverseRouter;
}
 
开发者ID:commercetools,项目名称:commercetools-sunrise-java-training,代码行数:15,代码来源:CheckoutShippingController.java


注:本文中的play.data.FormFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。