Package org.apache.wicket.util.value

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


   */
  protected void onComponentTag(ComponentTag tag)
  {
    // Must be attached to a style tag
    checkComponentTag(tag, "link");
    IValueMap attributes = tag.getAttributes();
    attributes.put("rel", "stylesheet");
    attributes.put("type", "text/css");
  }
View Full Code Here


   */
  protected void onComponentTag(ComponentTag tag)
  {
    // Must be attached to a script tag
    checkComponentTag(tag, "script");
    IValueMap attributes = tag.getAttributes();
    attributes.put("type", "text/javascript");
  }
View Full Code Here


  protected void onComponentTag(ComponentTag tag)
  {
    super.onComponentTag(tag);
    IValueMap attrs = tag.getAttributes();
    String onFocus = getPalette().getChoicesOnFocusJS();
    if (onFocus != null)
    {
      attrs.put("onFocus", onFocus);
    }

    tag.getAttributes().put("ondblclick", getPalette().getAddOnClickJS());
  }
View Full Code Here

   */
  public String getAttribute(String attribute)
  {
    String value = null;

    IValueMap attributeMap = openTag.getAttributes();

    if (attributeMap != null)
    {
      for (Iterator iter = attributeMap.keySet().iterator(); iter.hasNext();)
      {
        String attr = (String)iter.next();

        if (attr.equalsIgnoreCase(attribute))
        {
          value = attributeMap.getString(attr);
        }
      }
    }

    return value;
View Full Code Here

          {
            XmlTag xmlTag = (XmlTag)elm;

            if (openTag == null)
            {
              IValueMap attributeMap = xmlTag.getAttributes();

              for (Iterator iter = attributeMap.entrySet().iterator(); iter.hasNext();)
              {
                Map.Entry entry = (Map.Entry) iter.next();

                String attr = (String) entry.getKey();
View Full Code Here

      buffer.append(':');
    }

    buffer.append(name);

    final IValueMap attributes = getAttributes();
    if (attributes.size() > 0)
    {
      final Iterator iterator = attributes.keySet().iterator();
      for (; iterator.hasNext();)
      {
        final String key = (String)iterator.next();
        if ((key != null) &&
            ((attributeToBeIgnored == null) || !key
View Full Code Here

      buffer.append(':');
    }

    buffer.append(name);

    final IValueMap attributes = getAttributes();
    if (attributes.size() > 0)
    {
      final Iterator<String> iterator = attributes.keySet().iterator();
      for (; iterator.hasNext();)
      {
        final String key = iterator.next();
        if ((key != null) &&
          ((attributeToBeIgnored == null) || !key.equalsIgnoreCase(attributeToBeIgnored)))
View Full Code Here

  @Override
  protected void onComponentTag(ComponentTag tag)
  {
    // Must be attached to a style tag
    checkComponentTag(tag, "link");
    IValueMap attributes = tag.getAttributes();
    attributes.put("rel", "stylesheet");
    attributes.put("type", "text/css");
  }
View Full Code Here

  @Override
  protected void onComponentTag(ComponentTag tag)
  {
    // Must be attached to a script tag
    checkComponentTag(tag, "script");
    IValueMap attributes = tag.getAttributes();
    attributes.put("type", "text/javascript");
  }
View Full Code Here

   * @return Wicket namespace
   */
  private String determineWicketNamespace(final ComponentTag tag)
  {
    // For all tags attributes
    final IValueMap attributes = tag.getAttributes();
    final Iterator<Map.Entry<String, Object>> it = attributes.entrySet().iterator();
    while (it.hasNext())
    {
      final Map.Entry<String, Object> entry = it.next();

      // Find attributes with namespace "xmlns"
      final String attributeName = entry.getKey();
      if (attributeName.startsWith(XMLNS))
      {
        final String xmlnsUrl = (String)entry.getValue();

        // If Wicket relevant ...
        if ((xmlnsUrl == null) || (xmlnsUrl.trim().length() == 0) ||
          xmlnsUrl.startsWith(WICKET_URI))
        {
          // Set the Wicket namespace for wicket tags (e.g.
          // <wicket:panel>) and attributes (e.g. wicket:id)
          final String namespace = attributeName.substring(XMLNS.length());
          if (Application.get().getMarkupSettings().getStripWicketTags())
          {
            attributes.remove(attributeName);

            // Make sure the parser knows it has been changed
            tag.setModified(true);
          }

View Full Code Here

TOP

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

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.