Package org.apache.wicket.util.value

Examples of org.apache.wicket.util.value.ValueMap


        "&").toString();

      decodedParamReplacement = WicketURLDecoder.QUERY_INSTANCE.decode(decodedParamReplacement);

      // Add ALL of the params from the decoded 'x' param
      ValueMap params = new ValueMap();
      RequestUtils.decodeParameters(decodedParamReplacement, params);
      parameterMap.putAll(params);

      // Rebuild the URL with the 'x' param removed
      int pos1 = url.indexOf("?x=");
View Full Code Here


     *            id of the form component
     * @param panel
     */
    public SignInForm(final String id, UsernamePasswordSignInPanel panel)
    {
      super(id, new CompoundPropertyModel<IValueMap>(new ValueMap()));
      this.panel = panel;

      // only save username, not passwords
      add(new TextField<String>("username").setPersistent(rememberMe));
      add(new PasswordTextField("password"));
View Full Code Here

      {
        // Verwijder de persistente waarden van het formulier
        getPage().removePersistedFormData(SignInForm.class, true);
      }

      ValueMap values = (ValueMap)getDefaultModelObject();
      String username = values.getString("username");
      String password = values.getString("password");

      if (panel.signIn(username, password))
      {
        if (!getPage().continueToOriginalDestination())
        {
View Full Code Here

      Time time = resourceReference.lastModifiedTime();
      if (time != null)
      {
        if (parameters == null)
        {
          parameters = new ValueMap();
          parameters.put("w:lm", new Long(time.getMilliseconds() / 1000));
        }
      }
    }
View Full Code Here

   *
   */
  public void testRequestWithIndexedParams()
  {
    final WebRequestCycle cycle = tester.setupRequestAndResponse();
    final ValueMap params = new ValueMap();
    params.add("0", "foo");
    params.add("1", "bar");
    final String url = cycle.urlFor(new ResourceReference(RESOURCE_NAME), params).toString();
    assertEquals("test/foo/bar", url);
    tester.getServletRequest().setURL(URL_PREFIX + url);
    tester.processRequestCycle(cycle);
    assertEquals(2, resource.params.size());
View Full Code Here

   * @return markup attributes
   */
  public final ValueMap getMarkupAttributes()
  {
    MarkupStream markupStream = locateMarkupStream();
    ValueMap attrs = new ValueMap(markupStream.getTag().getAttributes());
    attrs.makeImmutable();
    return attrs;
  }
View Full Code Here

  public final ValueMap getMarkupAttributes()
  {
    ComponentTag tag = getMarkupTag();
    if (tag != null)
    {
      ValueMap attrs = new ValueMap(tag.getAttributes());
      attrs.makeImmutable();
      return attrs;
    }
    return ValueMap.EMPTY_MAP;
  }
View Full Code Here

   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new ByteArrayOutputStream(), new NotSerializableException());
    checker.writeObject(new ValueMap());
  }
View Full Code Here

   * Tests the CPM inheritance by setting a different root model using a rendered scenario.
   */
  @Test
  public void testCompoundPropertyModelRendered()
  {
    ValueMap data1 = new ValueMap();
    data1.put("label", "foo");

    ValueMap data2 = new ValueMap();
    data2.put("label", "bar");

    InheritedTestPage page = new InheritedTestPage();


    page.setDefaultModel(new CompoundPropertyModel<ValueMap>(data1));
View Full Code Here

   * Tests the CPM by setting a different root model using a direct scenario.
   */
  @Test
  public void testCompoundPropertyModelDirect()
  {
    ValueMap data1 = new ValueMap();
    data1.put("label", "foo");

    ValueMap data2 = new ValueMap();
    data2.put("label", "bar");

    WebMarkupContainer parent = new WebMarkupContainer("foo");
    Label label = new Label("label");
    parent.add(label);

    parent.setDefaultModel(new CompoundPropertyModel<ValueMap>(data1));
    assertEquals("foo", label.getDefaultModelObject());

    parent.setDefaultModel(new CompoundPropertyModel<ValueMap>(data2));
    assertEquals("bar", label.getDefaultModelObject());

    data2.put("label", "foo");
    assertEquals("foo", label.getDefaultModelObject());
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.value.ValueMap

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.