Package org.apache.wicket

Examples of org.apache.wicket.Application$DefaultPageManagerProvider


   *            Value to encode
   * @return String encoded using default Application request/respose encoding
   */
  public String encode(String s)
  {
    Application app = null;

    try
    {
      app = Application.get();
    }
    catch (WicketRuntimeException ignored)
    {
      log.warn("No current Application found - defaulting encoding to UTF-8");
    }
    return encode(s, app == null ? "UTF-8" : app.getRequestCycleSettings()
      .getResponseRequestEncoding());
  }
View Full Code Here


          Class candidate = null;
          try
          {
            // Can the application always be taken??
            Application application = Application.get();
            IApplicationSettings applicationSettings = application.getApplicationSettings();
            IClassResolver classResolver = applicationSettings.getClassResolver();

            candidate = classResolver.resolveClass(className);
            if (candidate == null)
            {
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

    // Begin encoding URL
    final AppendingStringBuffer url = new AppendingStringBuffer(64);

    // Get page Class
    final Class pageClass = requestTarget.getPageClass();
    final Application application = Application.get();

    // Find pagemap name
    String pageMapName = requestTarget.getPageMapName();
    if (pageMapName == null)
    {
      IRequestTarget currentTarget = requestCycle.getRequestTarget();
      if (currentTarget instanceof IPageRequestTarget)
      {
        Page currentPage = ((IPageRequestTarget)currentTarget).getPage();
        final IPageMap pageMap = currentPage.getPageMap();
        if (pageMap.isDefault())
        {
          pageMapName = "";
        }
        else
        {
          pageMapName = pageMap.getName();
        }
      }
      else
      {
        pageMapName = "";
      }
    }

    WebRequestEncoder encoder = new WebRequestEncoder(url);
    if (!application.getHomePage().equals(pageClass) ||
      !"".equals(pageMapName) ||
      (application.getHomePage().equals(pageClass) && requestTarget instanceof BookmarkableListenerInterfaceRequestTarget))
    {
      /*
       * Add <page-map-name>:<bookmarkable-page-class>
       *
       * Encode the url so it is correct even for class names containing non ASCII characters,
View Full Code Here

    String relativePath = getRelativePath(httpServletRequest);

    if (isWicketRequest(relativePath))
    {
      Application previous = null;
      if (Application.exists())
      {
        previous = Application.get();
      }
      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

      {
        // 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

     * @param s Value to encode
     * @return String encoded using default Application request/respose encoding
     */
    public String decode(String s)
    {
        Application app = null;

        try {
            app = Application.get();
        }
        catch (WicketRuntimeException ignored)
        {
            log.warn("No current Application found - defaulting encoding to UTF-8");
        }
        return decode(s, app == null ? "UTF-8" : app.getRequestCycleSettings().getResponseRequestEncoding());   
    }
View Full Code Here

    if (valueParser.matches())
    {
      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
        resourceReference = new ResourceReference(Application.class, imageReferenceName);
View Full Code Here

    {
      ITargetRespondListener listener = (ITargetRespondListener)it.next();
      listener.onTargetRespond(this);
    }

    final Application app = Application.get();

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

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

TOP

Related Classes of org.apache.wicket.Application$DefaultPageManagerProvider

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.