Package org.apache.wicket

Examples of org.apache.wicket.Application


              log
                  .debug("Class not found by using objects own classloader, trying the IClassResolver");
            }


            Application application = Application.get();
            IApplicationSettings applicationSettings = application
                .getApplicationSettings();
            IClassResolver classResolver = applicationSettings.getClassResolver();

            Class candidate = null;
            try
View Full Code Here


        // ignore this exception.
        log
            .debug("Class not found by using objects own classloader, trying the IClassResolver");
      }

      Application application = Application.get();
      IApplicationSettings applicationSettings = application.getApplicationSettings();
      IClassResolver classResolver = applicationSettings.getClassResolver();

      Class candidate = null;
      try
      {
View Full Code Here

  /**
   * @see org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle)
   */
  public final void respond(final RequestCycle requestCycle)
  {
    final Application app = Application.get();

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

    // Set content type based on markup type for page
    final WebResponse response = (WebResponse)requestCycle.getResponse();
    response.setCharacterEncoding(encoding);
    response.setContentType("text/xml; charset=" + encoding);
View Full Code Here

    public void valueUnbound(HttpSessionBindingEvent evt)
    {
      if (!unbound)
      {
        unbound = true;
        Application application = Application.get(applicationKey);
        if (application != null)
        {
          application.getSessionStore().unbind(sessionId);
        }
      }
    }
View Full Code Here

    private IPageStore getPageStore()
    {
      if (sessionStore == null)
      {
        Application app = Application.exists() ? Application.get() : null;
        if (app != null)
        {
          sessionStore = (SecondLevelCacheSessionStore)app.getSessionStore();
        }
      }
      if (sessionStore != null)
      {
        return sessionStore.getStore();
View Full Code Here

    {
      final String imageReferenceName = valueParser.getImageReferenceName();
      final String specification = Strings.replaceHtmlEscapeNumber(valueParser
          .getSpecification());
      final String factoryName = valueParser.getFactoryName();
      final Application application = component.getApplication();

      // Do we have a reference?
      if (!Strings.isEmpty(imageReferenceName))
      {
        // Is resource already available via the application?
        if (application.getSharedResources().get(Application.class, imageReferenceName,
            locale, style, true) == null)
        {
          // Resource not available yet, so create it with factory and
          // share via Application
          final Resource imageResource = getResourceFactory(application, factoryName)
              .newResource(specification, locale, style);
          application.getSharedResources().add(Application.class, imageReferenceName,
              locale, style, imageResource);
        }

        // Create resource reference
        this.resourceReference = new ResourceReference(Application.class,
View Full Code Here

    }
  }

  private static Map getClassesToGetAndSetters()
  {
    Application app = Application.get();
    Map result = (Map)applicationToClassesToGetAndSetters.get(Application.get());
    if (result == null)
    {
      // Don't synchronize this - Doesn't matter if we create two of them,
      // as it's only a cache and the first will go out of scope and get
View Full Code Here

   */
  private void testContentType()
  {
    if (contentType == null || contentType.indexOf("unknown") != -1)
    {
      Application application = Application.get();
      if (application instanceof WebApplication)
      {
        // TODO Post 1.2: General: For non webapplication another method
        // should be implemented (getMimeType on application?)
        contentType = ((WebApplication)application).getServletContext()
View Full Code Here

    public void valueUnbound(HttpSessionBindingEvent evt)
    {
      if (!unbound)
      {
        unbound = true;
        Application application = Application.get(applicationKey);
        if (application != null)
        {
          application.getSessionStore().unbind(sessionId);
        }
      }
    }
View Full Code Here

    private final String applicationKey;
    private String sessionId;

    private IPageStore getPageStore()
    {
      Application application = Application.get(applicationKey);

      if (application != null)
      {
        SecondLevelCacheSessionStore store = (SecondLevelCacheSessionStore)application.getSessionStore();

        return store.getStore();
      }
      else
      {
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.