Package org.apache.wicket

Examples of org.apache.wicket.Session$IPageMapVisitor


   * @return the home page as a request target
   */
  protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
    final RequestParameters requestParameters)
  {
    Session session = requestCycle.getSession();
    Application application = session.getApplication();
    try
    {
      // Get the home page class
      Class<? extends Page> homePageClass = application.getHomePage();

View Full Code Here


   */
  protected IRequestTarget resolveRenderedPage(final RequestCycle requestCycle,
    final RequestParameters requestParameters)
  {
    final String componentPath = requestParameters.getComponentPath();
    final Session session = requestCycle.getSession();
    final Page page = session.getPage(requestParameters.getPageMapName(), componentPath,
      requestParameters.getVersionNumber());

    // Does page exist?
    if (page != null)
    {
View Full Code Here

        if (requestParameters.isOnlyProcessIfPathActive())
        {
          // this request has indeed been flagged as
          // process-only-if-path-is-active

          Session session = Session.get();
          IPageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
              false);
          if (pageMap == null)
          {
            // requested pagemap no longer exists - ignore this
            // request
View Full Code Here

   */
  @Override
  protected String load()
  {
    // Initialize information that we need to work successfully
    final Session session = Session.get();
    if (session != null)
    {
      localizer = Application.get().getResourceSettings().getLocalizer();
      locale = session.getLocale();
    }
    else
    {
      throw new WicketRuntimeException(
        "Cannot attach a string resource model without a Session context because that is required to get a Localizer");
View Full Code Here

    // Get locator to search for the resource
    final IResourceStreamLocator locator = Application.get()
      .getResourceSettings()
      .getResourceStreamLocator();

    final Session session = Session.get();
    final String style = session.getStyle();
    final Locale locale = session.getLocale();

    MarkupResourceStream markupResourceStream = null;
    Class< ? > containerClass = getClass();

    while (!(containerClass.equals(MarkupComponentBorder.class)))
View Full Code Here

       *      org.apache.wicket.Response)
       */
      @Override
      public Session newSession(Request request, Response response)
      {
        Session session = super.newSession(request, response);
        session.setLocale(Locale.ENGLISH);
        return session;
      }
    };

    tester = new WicketTester(myApplication);
View Full Code Here

        if (requestParameters.isOnlyProcessIfPathActive())
        {
          // this request has indeed been flagged as
          // process-only-if-path-is-active

          Session session = Session.get();
          IPageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
            false);
          if (pageMap == null)
          {
            // requested pagemap no longer exists - ignore this
            // request
View Full Code Here

   */
  protected IRequestTarget resolveBookmarkablePage(final RequestCycle requestCycle,
      final RequestParameters requestParameters)
  {
    String bookmarkablePageClass = requestParameters.getBookmarkablePageClass();
    Session session = requestCycle.getSession();
    Class pageClass;
    try
    {
      pageClass = session.getClassResolver().resolveClass(bookmarkablePageClass);
    }
    catch (ClassNotFoundException e)
    {
      return new WebErrorCodeResponseTarget(HttpServletResponse.SC_NOT_FOUND,
          "Unable to load Bookmarkable Page");
    }

    try
    {
      PageParameters params = new PageParameters(requestParameters.getParameters());
      if (requestParameters.getComponentPath() != null
          && requestParameters.getInterfaceName() != null)
      {
        final String componentPath = requestParameters.getComponentPath();
        final Page page = session.getPage(requestParameters.getPageMapName(),
            componentPath, requestParameters.getVersionNumber());

        if (page != null && page.getClass() == pageClass)
        {
          return resolveListenerInterfaceTarget(requestCycle, page, componentPath,
View Full Code Here

   * @return the home page as a request target
   */
  protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
      final RequestParameters requestParameters)
  {
    Session session = requestCycle.getSession();
    Application application = session.getApplication();
    try
    {
      // Get the home page class
      Class homePageClass = application.getHomePage();

View Full Code Here

   */
  protected IRequestTarget resolveRenderedPage(final RequestCycle requestCycle,
      final RequestParameters requestParameters)
  {
    final String componentPath = requestParameters.getComponentPath();
    final Session session = requestCycle.getSession();
    final Page page = session.getPage(requestParameters.getPageMapName(), componentPath,
        requestParameters.getVersionNumber());

    // Does page exist?
    if (page != null)
    {
View Full Code Here

TOP

Related Classes of org.apache.wicket.Session$IPageMapVisitor

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.