Package org.apache.wicket.protocol.http

Examples of org.apache.wicket.protocol.http.WebApplication


   * https://issues.apache.org/jira/browse/WICKET-4123
   */
  @Test
  public void useCustomServletWebRequest()
  {
    WebApplication application = new WebApplication()
    {
      @Override
      public Class<? extends Page> getHomePage()
      {
        return CustomRequestPage.class;
View Full Code Here


        counter.getAndIncrement();
        return responseBuffer;
      }
    };

    final WebApplication application = new DummyApplication()
    {
      @Override
      protected void init()
      {
        super.init();
View Full Code Here

  {

    @Override
    protected void configure()
    {
      bind(WebApplication.class).toInstance(new WebApplication()
      {
        @Override
        public Class<? extends Page> getHomePage()
        {
          return null;
View Full Code Here

  {
    String velocityPropertiesFile = "velocity.properties";

    if (application instanceof WebApplication)
    {
      WebApplication webapp = (WebApplication)application;
      ServletContext servletContext = webapp.getServletContext();
      String propertiesFolder = servletContext.getInitParameter("velocityPropertiesFolder");
      String propsFile = servletContext.getInitParameter("velocity.properties");

      if (null != propsFile)
      {
View Full Code Here

    else
    {
      throw new RuntimeException(
        "To use GuiceWebApplicationFactory, you must specify either an 'injectorContextAttribute' or a 'module' init-param.");
    }
    WebApplication app = injector.getInstance(WebApplication.class);
    app.getComponentInstantiationListeners().add(new GuiceComponentInjector(app, injector));
    return app;
  }
View Full Code Here

   * @see org.apache.wicket.behavior.IBehaviorListener#onRequest()
   */
  @Override
  public final void onRequest()
  {
    WebApplication app = (WebApplication)getComponent().getApplication();
    AjaxRequestTarget target = app.newAjaxRequestTarget(getComponent().getPage());

    RequestCycle requestCycle = RequestCycle.get();
    requestCycle.scheduleRequestHandlerAfterCurrent(target);

    respond(target);
View Full Code Here

  @Before
  public void before() throws Exception
  {

    tester = new WicketTester();
    WebApplication webApplication = tester.getApplication();
    webApplication.mountPage(EXPECTED_URL.toString(), DummyHomePage.class);
    mapper = new CryptoMapper(webApplication.getRootRequestMapper(), webApplication);
  }
View Full Code Here

   * @since 6.0
   */
  protected final AjaxRequestAttributes getAttributes()
  {
    AjaxRequestAttributes attributes = new AjaxRequestAttributes();
    WebApplication application = (WebApplication)getComponent().getApplication();
    AjaxRequestTargetListenerCollection ajaxRequestTargetListeners = application.getAjaxRequestTargetListeners();
    for (AjaxRequestTarget.IListener listener : ajaxRequestTargetListeners)
    {
      if (listener instanceof AjaxRequestTarget.AbstractListener)
      {
        ((AjaxRequestTarget.AbstractListener)listener).updateAjaxAttributes(attributes);
View Full Code Here

   * @see org.apache.wicket.behavior.IBehaviorListener#onRequest()
   */
  @Override
  public final void onRequest()
  {
    WebApplication app = (WebApplication)getComponent().getApplication();
    AjaxRequestTarget target = app.newAjaxRequestTarget(getComponent().getPage());

    RequestCycle requestCycle = RequestCycle.get();
    requestCycle.scheduleRequestHandlerAfterCurrent(target);

    respond(target);
View Full Code Here

  public WebSocketTester(final WicketTester wicketTester, final Page page)
  {
    Args.notNull(wicketTester, "wicketTester");
    Args.notNull(page, "page");

    WebApplication webApplication = wicketTester.getApplication();
    webApplication.getWicketFilter().setFilterPath("");

    socketProcessor = new TestWebSocketProcessor(wicketTester, page)
    {
      @Override
      protected void onOutMessage(String message)
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.WebApplication

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.