<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:spring="http://www.springframework.org/tags" xmlns:form="http://www.springframework.org/tags/form" xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
  <jsp:output omit-xml-declaration="yes" />

  <jsp:directive.attribute name="id" type="java.lang.String" required="true" description="The identifier for this tag (do not change!)" />
  <jsp:directive.attribute name="path" type="java.lang.String" required="true" description="The relative path to the respource" />
  <jsp:directive.attribute name="field" type="java.lang.String" required="true" description="The field exposed from the form backing object" />
  <jsp:directive.attribute name="required" type="java.lang.Boolean" required="false" description="Indicates if this field is required (default false)" />
  <jsp:directive.attribute name="label" type="java.lang.String" required="false" description="The label used for this field, will default to a message bundle if not supplied" />
  <jsp:directive.attribute name="render" type="java.lang.Boolean" required="false" description="Indicate if the contents of this tag and all enclosed tags should be rendered (default 'true')" />
  <jsp:directive.attribute name="z" type="java.lang.String" required="false" description="Used for checking if element has been modified (to recalculate simply provide empty string value)" />

  <c:if test="${empty render or render}">

    <c:if test="${empty label}">
      <spring:message code="label_${fn:toLowerCase(fn:substringAfter(id,'_'))}" var="label" />
    </c:if>

    <div id="_${fn:escapeXml(id)}_id">
      <label for="_${fn:escapeXml(field)}_id">
        <c:out value="${fn:escapeXml(label)}" />
        :
      </label>
      <spring:url value="${path}" var="create_url">
        <spring:param name="form" />
      </spring:url>
      <a href="${fn:escapeXml(create_url)}">
        <spring:url value="/resources/images/add.png" var="create_img_url" />
        <spring:message arguments="${field}" code="global_menu_new" var="add_message" />
        <img alt="${fn:escapeXml(add_message)}" src="${fn:escapeXml(create_img_url)}" title="${fn:escapeXml(add_message)}" />
      </a>
      <c:out value=" " />
      <spring:message arguments="${label}" code="entity_not_found" />
      <c:if test="${not empty required and required eq 'true'}">
        (
        <spring:message code="field_required" />
        )
      </c:if>
    </div>
    <br />

  </c:if>
</jsp:root>