Package org.apache.wicket.util.value

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


  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


   * @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

      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

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

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

    InheritedTestPage page = new InheritedTestPage();

    tester.setupRequestAndResponse();
    page.setDefaultModel(new CompoundPropertyModel(data1));
View Full Code Here

  /**
   * Tests the CPM by setting a different root model using a direct scenario.
   */
  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(data1));
    assertEquals("foo", label.getDefaultModelObject());

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

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

  /**
   * Tests if Component#FLAG_INHERITABLE_MODEL reset after model change (WICKET-3413).
   */
  public void testResetInheritedModelFlag()
  {
    ValueMap data1 = new ValueMap();
    data1.put("label", "foo");

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

    InheritedTestPage page = new InheritedTestPage();

    tester.setupRequestAndResponse();
    page.setDefaultModel(new CompoundPropertyModel(data1));
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

   * @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

          }
        });
      }

      log.info("Loading properties files from " + resourceStream);
      ValueMap strings = null;

      try
      {
        BufferedInputStream in = null;

        try
        {
          // Get the InputStream
          in = new BufferedInputStream(resourceStream.getInputStream());

          java.util.Properties properties = loadProperties(in);

          // Copy the properties into the ValueMap
          strings = new ValueMap();
          Enumeration<?> enumeration = properties.propertyNames();
          while (enumeration.hasMoreElements())
          {
            String property = (String)enumeration.nextElement();
            strings.put(property, properties.getProperty(property));
          }

          return new Properties(path, strings);
        }
        finally
View Full Code Here

    {
      Resource.parameters.set(null);
    }
    else
    {
      Resource.parameters.set(new ValueMap(parameters));
    }
  }
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.