Examples of IValueMap


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

   * @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
Copyright © 2018 www.massapi.com. 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.