Package org.apache.wicket.util.string

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


    return getBean(OAuth2Dao.class).getActive().size() > 0;
  }
 
  public SignInPage(PageParameters p) {
    super();
    StringValue oauthid = p.get("oauthid");
    if (!oauthid.isEmpty()) { // oauth2 login
      try {
        long serverId = oauthid.toLong(-1);
        OAuthServer server = getBean(OAuth2Dao.class).get(serverId);
        log.debug("OAuthServer=" + server);
        if (server == null) {
          log.warn("OAuth server id=" + serverId + " not found");
          return;
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

    add(form);
    form.setMultiPart(true);
    form.setMaxSize(Bytes.kilobytes(100));
    form.add(new TextField<String>("text"));
    fileUploadField = new FileUploadField("file", new Model<FileUpload>());
    StringValue requiredParam = param.getNamedParameter("required");
    boolean required = requiredParam.toBoolean();
    fileUploadField.setRequired(required);
    form.add(fileUploadField);
  }
View Full Code Here

  @Test
  public void getNonExistingPlaceholder()
  {
    MountParameters placeholders = new MountParameters();

    StringValue value = placeholders.getValue("non-existing");
    assertTrue(value.isNull());
  }
View Full Code Here

  @Test
  public void getExistingPlaceholder()
  {
    final String parameterName = "placeholder";
    StringValue originalValue = StringValue.valueOf("value");

    MountParameters placeholders = new MountParameters();
    placeholders.setValue(parameterName, originalValue);

    StringValue actualValue = placeholders.getValue(parameterName);
    assertEquals(originalValue.toString(), actualValue.toString());
  }
View Full Code Here

   */
  public StringValue getParameterValue(String name)
  {
    for (IRequestParameters p : parameters)
    {
      StringValue value = p.getParameterValue(name);
      if (!value.isNull())
      {
        return value;
      }
    }
    return StringValue.valueOf((String)null);
View Full Code Here

    add(form);
    form.setMultiPart(true);
    form.setMaxSize(Bytes.kilobytes(100));
    form.add(new TextField<String>("text"));
    fileUploadField = new FileUploadField("file", new Model<FileUpload>());
    StringValue requiredParam = param.get("required");
    boolean required = requiredParam.toBoolean();
    fileUploadField.setRequired(required);
    form.add(fileUploadField);
  }
View Full Code Here

    PageParameters params = resource.pageParameters;
    assertNotNull(params);
    assertEquals(0, params.getAllNamed().size());
    assertEquals(2, params.getIndexedCount());

    StringValue paramId = params.get(0);
    assertNotNull(paramId);
    assertEquals(1, paramId.toInt());

    StringValue paramName = params.get(1);
    assertNotNull(paramName);
    assertEquals("fred", paramName.toString());
  }
View Full Code Here

    PageParameters params = resource.pageParameters;
    assertNotNull(params);
    assertEquals(3, params.getAllNamed().size());
    assertEquals(2, params.getIndexedCount());

    StringValue paramId = params.get(0);
    assertNotNull(paramId);
    assertEquals(1, paramId.toInt());

    StringValue paramName = params.get(1);
    assertNotNull(paramName);
    assertEquals("fred", paramName.toString());

    List<StringValue> foo = params.getValues("foo");
    assertNotNull(foo.size() == 2);
    assertEquals("bar", foo.get(0).toString(""));
    assertEquals("baz", foo.get(1).toString(""));

    StringValue paramValue = params.get("value");
    assertEquals(12, paramValue.toInt());
  }
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

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.