Package org.apache.wicket

Examples of org.apache.wicket.WicketRuntimeException


      response.render(OnDomReadyHeaderItem.forScript("$('#" + component.getMarkupId() +
        "').wicketAtmosphere(" + options.toString() + ")"));
    }
    catch (JSONException e)
    {
      throw new WicketRuntimeException(e);
    }
  }
View Full Code Here


        PageParameters pp = new PageParameters();
        return processPage(newPage(constructor, pp), pp);
      }
      else
      {
        throw new WicketRuntimeException("Unable to create page from " + pageClass +
          ". Class does not have a visible default contructor.", e);
      }
    }
  }
View Full Code Here

        return (Page)constructor.newInstance();
      }
    }
    catch (InstantiationException e)
    {
      throw new WicketRuntimeException(createDescription(constructor, argument), e);
    }
    catch (IllegalAccessException e)
    {
      throw new WicketRuntimeException(createDescription(constructor, argument), e);
    }
    catch (InvocationTargetException e)
    {
      if (e.getTargetException() instanceof ReplaceHandlerException ||
        e.getTargetException() instanceof AuthorizationException ||
        e.getTargetException() instanceof MarkupException)
      {
        throw (RuntimeException)e.getTargetException();
      }
      throw new WicketRuntimeException(createDescription(constructor, argument), e);
    }
  }
View Full Code Here

      resources = getClassLoader().getResources(name);
      loadResources(resources, resultSet);
    }
    catch (Exception e)
    {
      throw new WicketRuntimeException(e);
    }

    return resultSet.iterator();
  }
View Full Code Here

        // Instantiate the factory
        return (IWebApplicationFactory)factoryClass.newInstance();
      }
      catch (ClassCastException e)
      {
        throw new WicketRuntimeException("Application factory class " +
          appFactoryClassName + " must implement IWebApplicationFactory");
      }
      catch (ClassNotFoundException e)
      {
        throw new WebApplicationFactoryCreationException(appFactoryClassName, e);
View Full Code Here

      {
        filterPath = "";
      }
      else if (!result.startsWith("/") || !result.endsWith("/*"))
      {
        throw new WicketRuntimeException("Your " + FILTER_MAPPING_PARAM +
          " must start with \"/\" and end with \"/*\". It is: " + result);
      }
      else
      {
        // remove leading "/" and trailing "*"
 
View Full Code Here

   *            The password
   * @return True if the user was authenticated successfully
   */
  public boolean authenticate(final String username, final String password)
  {
    throw new WicketRuntimeException(
      "You must subclass WebSession and implement your own authentication method for all Wicket applications using authentication.");
  }
View Full Code Here

  public final static void setValue(final String expression, final Object object,
    final Object value, final PropertyResolverConverter converter)
  {
    if (expression == null || expression.equals(""))
    {
      throw new WicketRuntimeException("Empty expression setting value: " + value +
        " on object: " + object);
    }
    if (object == null)
    {
      throw new WicketRuntimeException(
        "Attempted to set property value on a null object. Property expression: " +
          expression + " Value: " + value);
    }

    ObjectAndGetSetter setter = getObjectAndGetSetter(expression, object, CREATE_NEW_VALUE);
    if (setter == null)
    {
      throw new WicketRuntimeException("Null object returned for expression: " + expression +
        " for setting value: " + value + " on: " + object);
    }
    setter.setValue(value, converter == null ? new PropertyResolverConverter(Application.get()
      .getConverterLocator(), Session.get().getLocale()) : converter);
  }
View Full Code Here

  public final static Class<?> getPropertyClass(final String expression, final Object object)
  {
    ObjectAndGetSetter setter = getObjectAndGetSetter(expression, object, RESOLVE_CLASS);
    if (setter == null)
    {
      throw new WicketRuntimeException("Null object returned for expression: " + expression +
        " for getting the target classs of: " + object);
    }
    return setter.getTargetClass();
  }
View Full Code Here

  public static <T> Class<T> getPropertyClass(final String expression, final Class<?> clz)
  {
    ObjectAndGetSetter setter = getObjectAndGetSetter(expression, null, RESOLVE_CLASS, clz);
    if (setter == null)
    {
      throw new WicketRuntimeException("No Class returned for expression: " + expression +
        " for getting the target classs of: " + clz);
    }
    return (Class<T>)setter.getTargetClass();
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.WicketRuntimeException

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.