Package org.apache.wicket

Examples of org.apache.wicket.WicketRuntimeException


                    return new UrlResourceStream(url);
                }
            }
            catch (MalformedURLException e)
            {
                throw new WicketRuntimeException(e);
            }

            // resource not found; fall back on class loading
            return super.locate(clazz, path);
        }
View Full Code Here


        onRejected(target);
      }
    }
    else
    {
      throw new WicketRuntimeException("unkown type '" + type + "'");
    }
  }
View Full Code Here

        {
          date = dateParamFormat.parse(dateParam);
        }
        catch (ParseException e)
        {
          throw new WicketRuntimeException(e);
        }

        onEvent(target, date);
      }

      protected IAjaxCallDecorator getAjaxCallDecorator()
      {
        return new AjaxCallDecorator()
        {
          private static final long serialVersionUID = 1L;

          public CharSequence decorateScript(CharSequence script)
          {
            AppendingStringBuffer b = new AppendingStringBuffer();

            Matcher mat = ajaxScriptPattern.matcher(script);
            if (mat.matches())
            {
              String url = mat.group(1);
              String newUrl = url + "&dateParam='+dateParam+'";
              b.append(Strings.replaceAll(script, url, newUrl));
            }
            else
            {
              throw new WicketRuntimeException("Internal error in Wicket");
            }

            return b;
          }
View Full Code Here

        try {
            return File.createTempFile("FileUploaderField", suffix).getAbsolutePath();
        }
        catch (IOException e) {
            throw new WicketRuntimeException("Cannot create temp file", e);
        }
    }
View Full Code Here

        {
          date = dateParamFormat.parse(dateParam);
        }
        catch (ParseException e)
        {
          throw new WicketRuntimeException(e);
        }

        onEvent(target, date);
      }

            @Override
      protected IAjaxCallDecorator getAjaxCallDecorator()
      {
        return new AjaxCallDecorator()
        {
          private static final long serialVersionUID = 1L;

                    @Override
          public CharSequence decorateScript(CharSequence script)
          {
            AppendingStringBuffer b = new AppendingStringBuffer();

            Matcher mat = ajaxScriptPattern.matcher(script);
            if (mat.matches())
            {
              String url = mat.group(1);
              String newUrl = url + "&dateParam='+dateParam+'";
              b.append(Strings.replaceAll(script, url, newUrl));
            }
            else
            {
              throw new WicketRuntimeException("Internal error in Wicket");
            }

            return b;
          }
View Full Code Here

      // show panel from selected tab
      T tab = tabs.get(currentTab);
      component = tab.getPanel(TAB_PANEL_ID);
      if (component == null)
      {
        throw new WicketRuntimeException("ITab.getPanel() returned null. TabbedPanel [" +
          getPath() + "] ITab index [" + currentTab + "]");
      }
    }

    if (!component.getId().equals(TAB_PANEL_ID))
    {
      throw new WicketRuntimeException(
        "ITab.getPanel() returned a panel with invalid id [" +
          component.getId() +
          "]. You must always return a panel with id equal to the provided panelId parameter. TabbedPanel [" +
          getPath() + "] ITab index [" + currentTab + "]");
    }
View Full Code Here

      populator.populateItem(cellItem, CELL_ITEM_ID, item.getModel());

      if (cellItem.get("cell") == null)
      {
        throw new WicketRuntimeException(
          populator.getClass().getName() +
            ".populateItem() failed to add a component with id [" +
            CELL_ITEM_ID +
            "] to the provided [cellItem] object. Make sure you call add() on cellItem and make sure you gave the added component passed in 'componentId' id. ( *cellItem*.add(new MyComponent(*componentId*, rowModel) )");
      }
View Full Code Here

      try
      {
        bytes = IOUtils.toByteArray(inputStream);
      } catch (IOException iox)
      {
        throw new WicketRuntimeException(iox);
      }

      RequestCycle cycle = RequestCycle.get();
      Attributes attributes;
      if (cycle != null)
View Full Code Here

    {
      return MessageDigest.getInstance(algorithm);
    }
    catch (NoSuchAlgorithmException e)
    {
      throw new WicketRuntimeException("message digest " + algorithm + " not found", e);
    }
  }
View Full Code Here

  {
    Application application = Application.get();

    if (application instanceof WebApplication == false)
    {
      throw new WicketRuntimeException(
        "The application attached to the current thread is not a " +
          WebApplication.class.getSimpleName());
    }

    return (WebApplication)application;
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.