Package org.apache.wicket.util.string

Examples of org.apache.wicket.util.string.StringValue


  @Override
  public Roles getRoles() {
    //first of all will check hashes
    try {
      IRequestParameters params = RequestCycle.get().getRequest().getRequestParameters();
      StringValue secureHash = params.getParameterValue("secureHash");
      StringValue invitationHash = params.getParameterValue("invitationHash");
      if (!secureHash.isEmpty() || !invitationHash.isEmpty()) {
        PageParameters pp = new PageParameters();
        for (String p : params.getParameterNames()) {
          for (StringValue sv : params.getParameterValues(p)) {
            if (!sv.isEmpty()) {
              pp.add(p, sv.toString());
View Full Code Here


        {
        }

        public Iterator<? extends Number> iterator(int first, int count)
        {
          StringValue emptyValue = getPageParameters().get("empty");
          return emptyValue.toBoolean() ? Collections.<Integer> emptyList().iterator()
            : items.iterator();
        }

        public int size()
        {
          StringValue emptyValue = getPageParameters().get("empty");
          return emptyValue.toBoolean() ? 0 : items.size();
        }

        public IModel<Number> model(Number object)
        {
          return Model.of(object);
View Full Code Here

        // the list that will contain accepted post param values
        List<StringValue> postValues = new ArrayList<StringValue>();

        for (String value : values)
        {
          StringValue val = StringValue.valueOf(value);
          if (queryValues.contains(val))
          {
            // if a query param with this value exists remove it and continue
            queryValues.remove(val);
          }
View Full Code Here

    return null;
  }
 
  private FlvRecording getRecording(Attributes attributes) {
    PageParameters params = attributes.getParameters();
    StringValue idStr = params.get("id");
    Long id = getLong(idStr);
    WebSession ws = WebSession.get();
    if (id != null && ws.isSignedIn()) {
      return getRecording(id);
    } else {
      ws.invalidate();
      if (ws.signIn(idStr.toString())) {
        return getRecording(getRecordingId());
      }
    }
    return null;
  }
View Full Code Here

    response.render(JavaScriptHeaderItem.forScript(getCallbackFunctionBody(resolved("baseUrl", "window.location.href")), "getBaseUrl"));
  }
 
  @Override
  protected void respond(AjaxRequestTarget target) {
    StringValue url = getComponent().getRequestCycle().getRequest().getRequestParameters().getParameterValue("baseUrl");
    String baseUrl = url.toString();
    int index =  baseUrl.indexOf('#');
    if (index > 0){
      baseUrl = baseUrl.substring(0, index);
    }
    index = baseUrl.indexOf('?');
View Full Code Here

  }
 
  public RoomPanel(String id, PageParameters pp) {
    super(id);

    StringValue swfVal = pp.get("swf");
    String swf = (swfVal.isEmpty() ? getFlashFile() : swfVal.toString())
        + new PageParametersEncoder().encodePageParameters(pp);
    add(new Label("init", String.format("initSwf('%s');", swf)).setEscapeModelStrings(false));
  }
View Full Code Here

  @Override
  public Roles getRoles() {
    //first of all will check hashes
    try {
      IRequestParameters params = RequestCycle.get().getRequest().getRequestParameters();
      StringValue secureHash = params.getParameterValue("secureHash");
      StringValue invitationHash = params.getParameterValue("invitationHash");
      if (!secureHash.isEmpty() || !invitationHash.isEmpty()) {
        PageParameters pp = new PageParameters();
        for (String p : params.getParameterNames()) {
          for (StringValue sv : params.getParameterValues(p)) {
            if (!sv.isEmpty()) {
              pp.add(p, sv.toString());
View Full Code Here

    add(new HeaderPanel("header", appName));
  }
 
  protected OmUrlFragment getUrlFragment(IRequestParameters params) {
    for (AreaKeys key : AreaKeys.values()) {
      StringValue type = params.getParameterValue(key.name());
      if (!type.isEmpty()) {
        return new OmUrlFragment(key, type.toString());
      }
    }
    return null;
  }
View Full Code Here

    return null;
  }
 
  private FlvRecording getRecording(Attributes attributes) {
    PageParameters params = attributes.getParameters();
    StringValue idStr = params.get("id");
    Long id = getLong(idStr);
    WebSession ws = WebSession.get();
    if (id != null && ws.isSignedIn()) {
      return getRecording(id);
    } else {
      ws.invalidate();
      if (ws.signIn(idStr.toString())) {
        return getRecording(getRecordingId());
      }
    }
    return null;
  }
View Full Code Here

  @Override
  public Roles getRoles() {
    //first of all will check hashes
    try {
      IRequestParameters params = RequestCycle.get().getRequest().getRequestParameters();
      StringValue secureHash = params.getParameterValue("secureHash");
      StringValue invitationHash = params.getParameterValue("invitationHash");
      if (!secureHash.isEmpty() || !invitationHash.isEmpty()) {
        PageParameters pp = new PageParameters();
        for (String p : params.getParameterNames()) {
          for (StringValue sv : params.getParameterValues(p)) {
            if (!sv.isEmpty()) {
              pp.add(p, sv.toString());
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.string.StringValue

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.