Package org.apache.wicket

Examples of org.apache.wicket.Application


   * Covariant override for easy getting the current {@link WebApplication} without having to cast
   * it.
   */
  public static WebApplication get()
  {
    Application application = Application.get();

    if (application instanceof WebApplication == false)
    {
      throw new WicketRuntimeException(
        "The application attached to the current thread is not a " +
View Full Code Here


    for (ITargetRespondListener listener : respondListeners)
    {
      listener.onTargetRespond(this);
    }

    final Application app = page.getApplication();

    page.send(app, Broadcast.BREADTH, this);

    // Determine encoding
    final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding();

    // Set content type based on markup type for page
    responseObject.setContentType(response, encoding);

    // Make sure it is not cached by a client
View Full Code Here

    }

    @Override
    public void run()
    {
      Application application = Application.get(applicationName);
      IWebSocketSettings webSocketSettings = IWebSocketSettings.Holder.get(application);
      IWebSocketConnectionRegistry webSocketConnectionRegistry = webSocketSettings.getConnectionRegistry();
      IWebSocketConnection connection = webSocketConnectionRegistry.getConnection(application, sessionId, key);

      int dataIndex = 0;
View Full Code Here

   * Covariant override for easy getting the current {@link WebApplication} without having to cast
   * it.
   */
  public static WebApplication get()
  {
    Application application = Application.get();

    if (application instanceof WebApplication == false)
    {
      throw new WicketRuntimeException(
        "The application attached to the current thread is not a " +
View Full Code Here

      if (wicketSession != null)
      {
        wicketSession.onInvalidate();
      }
     
      Application application = Application.get(applicationKey);
      if (application == null)
      {
        log.debug("Wicket application with name '{}' not found.", applicationKey);
        return;
      }

      ISessionStore sessionStore = application.getSessionStore();
      if (sessionStore != null)
      {
        if (sessionStore instanceof HttpSessionStore)
        {
          ((HttpSessionStore) sessionStore).onUnbind(sessionId);
View Full Code Here

   *            the provider of the page class/instance and its parameters
   * @return the html rendered by a page
   */
  public static CharSequence renderPage(final PageProvider pageProvider)
  {
    Application application = Application.get();

    RequestCycle originalRequestCycle = RequestCycle.get();

    BufferedWebResponse tempResponse = new BufferedWebResponse(null);

    RequestCycle tempRequestCycle = application.createRequestCycle(originalRequestCycle.getRequest(), tempResponse);

    try
    {
      ThreadContext.setRequestCycle(tempRequestCycle);
      pageProvider.getPageInstance().renderPage();
View Full Code Here

      if (pageClass != null && IRequestablePage.class.isAssignableFrom(pageClass))
      {
        if (Application.exists())
        {
          Application application = Application.get();

          if (application.getSecuritySettings().getEnforceMounts())
          {
            // we make an exception if the homepage itself was mounted, see WICKET-1898
            if (!pageClass.equals(application.getHomePage()))
            {
              // WICKET-5094 only enforce mount if page is mounted
              if (isPageMounted(pageClass, application))
              {
                return null;
View Full Code Here

    for (ITargetRespondListener listener : respondListeners)
    {
      listener.onTargetRespond(this);
    }

    final Application app = page.getApplication();

    page.send(app, Broadcast.BREADTH, this);

    // Determine encoding
    final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding();

    // Set content type based on markup type for page
    responseObject.setContentType(response, encoding);

    // Make sure it is not cached by a client
View Full Code Here

    ThreadContext old = ThreadContext.get(false);
    final ByteArrayInputStream in = new ByteArrayInputStream(data);
    ObjectInputStream ois = null;
    try
    {
      Application oldApplication = ThreadContext.getApplication();
      try
      {
        ois = newObjectInputStream(in);
        String applicationName = (String)ois.readObject();
        if (applicationName != null)
        {
          Application app = Application.get(applicationName);
          if (app != null)
          {
            ThreadContext.setApplication(app);
          }
        }
View Full Code Here

      try
      {
        // Can the application always be taken??
        // Should be if serialization happened in thread with application set
        // (WICKET-2195)
        Application application = Application.get();
        ApplicationSettings applicationSettings = application.getApplicationSettings();
        IClassResolver classResolver = applicationSettings.getClassResolver();

        candidate = classResolver.resolveClass(className);
        if (candidate == null)
        {
View Full Code Here

TOP

Related Classes of org.apache.wicket.Application

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.