AO Taglib Changelog

ao-taglib-9.0.0-SNAPSHOT

Snapshot Notes

  • Added onclick attribute to <ao:img />.
  • When parameter values are an Enum, the parameter value is obtained from Enum.name() instead of Enum.toString(). This is to intuitively use enums as parameters when Enum.toString() is overridden.
  • Added noscript attribute to <ao:link />, <ao:meta />, and <ao:style />. When true, surrounds the element with <noscript>.
  • New function ${ao:resourceExists()} that checks if a resource exists in the web application.
  • When capturing into a LinksAttribute parent, <ao:link /> now processes the href-related attributes immediately instead of deferring to parent. This allows relative hrefs to work correctly: relative to the initial content page, not the template.

ao-taglib-8.0.1

Release Notes

  • Fixed regression (bug): alt="${null}" (or equivalent) was not accepted, causing error "alt attribute required".

ao-taglib-8.0.0

Release Notes

  • This is a major version bump for incompatible changes of Java API only. The taglib was intended to be completely backward compatible, yet a couple of regressions were introduced:
    1. height="" and height="auto" no longer supported, attribute not required
    2. Regression (bug): alt="${null}" (or equivalent) is not accepted, causes error "alt attribute required". Workaround: Use alt=" ${expression}".
  • Log FINE-level notice when <ao:forward /> does not forward due to the response already being committed.
  • Log FINE-level notice when <ao:redirect /> does not send redirect due to the response already being committed.
  • Log FINE-level notice when <ao:sendError /> does not send error due to the response already being committed.
  • Using normalization methods from underlying implementation.
  • class, media, name, and type attributes are now java.lang.Object instead of java.lang.String.
  • width, height, and size attributes are now java.lang.Integer instead of java.lang.Object.
  • charset attributes now support java.nio.charset.Charset.
  • Moved resolveValue from AO Taglib to AO Servlet Util.
  • Added async and defer attributes to <ao:script />.
  • New tag <ao:onerror /> to provide scripts in nested context.
  • Added onerror and onload attributes to <ao:img />, <ao:input />, <ao:link />, and <ao:script />.
  • Improved support for taglib serialization: marked attribute fields transient and calling init() from readObject(…).
  • Link attributes hreflang, media, and title are now java.lang.Object instead of java.lang.String. This allows delegation to underlying API that may stream some value types.

ao-taglib-7.2.2

Release Notes

ao-taglib-7.2.1

Release Notes

  • Fixed <ao:params values="…" /> setter in legacy taglib. The implementation requires a ParamsTagBeanInfo class due to inheriting a getValues() method from TagSupport.

ao-taglib-7.2.0

Release Notes

ao-taglib-7.1.1

Release Notes

  • Updated dependencies.

ao-taglib-7.1.0

Release Notes

ao-taglib-7.0.1

Release Notes

  • value attributes no longer convert empty string to null, and thus value="" now works as expected.

ao-taglib-7.0.0

Release Notes

  • Updated to Java™ EE 7 Web Profile (Servlet 3.1, JSP 2.3, EL 3.0, and JSTL 1.2).
  • Now supports Java 9+ modules. Due to still having filename-based automatic module dependencies, *-SNAPSHOT versions include module-info.class while releases include the Automatic-Module-Name manifest entry. To minimize the difference between these modes, module-info.java does not perform any transitive requires.
  • Maven artifact relocated from com.aoindustries:ao-taglib to com.aoapps:ao-taglib.
  • Package renamed from com.aoindustries.taglib to com.aoapps.taglib.
  • Taglib URL changed to https://oss.aoapps.com/taglib/ to match project URL.

ao-taglib-6.4.1

Release Notes

  • Bug fix: Only pass charset to underlying API when non-null, since it is doctype dependent. Passing a null value fails on non-HTML5 doctypes.

ao-taglib-6.4.0

Release Notes

  • Updated dependencies.
  • Implemented automatic newline and tab indentation.

ao-taglib-6.3.0

Release Notes

  • ParamsAttribute now accepts parameter values as Object instead of String. The conversion to string may be deferred, or the value may be streamed instead of being converted to a string.

ao-taglib-6.2.0

Release Notes

  • Updated dependencies.
  • <ao:disableResourceEditor> improvements:
    1. New "scope" attribute that allows the in-context translator to be disabled only in the tag body.
    2. New "mode" attribute that provides the new mode used when disabling the in-context translator.

ao-taglib-6.1.0

Release Notes

  • Split development-only classes into a new sub-project in devel/. This sub-project is used only for development and is never deployed to artifact repositories.
  • Reverted a previous change made on 2020-03-01 that was released in version 5.0.0 on 2020-03-27. Encoding of in-context translation lookup markups is required after all.

    One example is the lookup IDs added inside alt attributes like alt="&lt;##&lt;value&gt;##&gt;". With this bug, this was incorrectly written as alt="<##<value>##>", which fails XML validation.

    This bug is unlikely to affect production systems for two reasons:

    1. Lookup markups are only performed when in-context translations are enabled, which is only when in development mode.
    2. Most production sites are served in SGML mode, where browsers will handle the incorrect HTML formatting. XML mode is used in development specifically for this stricter validation.
  • New function ${ao:isRtl()} that determines if the response locale is a right-to-left language.
  • New function ${ao:getProjectVersion()} that gets the version of a Maven project given its groupId and artifactId.

ao-taglib-6.0.0

Release Notes

  • Fixed implementation of ${ao:isForwarded()}. This function was broken by the last release's improved platform compatibility.
  • Removed support for IE 6, 7, 8, and 9 since all are end-of-life.
  • Added global attributes to all element tags.

    Minimized the duplication in implementation by using default interface methods, abstract base classes, and XML entities.

    Added more global attributes:

    1. dir
    2. Added global attribute data-*, with implementations for both HTML attribute and JavaScript property names.
  • Added size attribute to <ao:select>.
  • Added alternate implementation compatible with legacy JSP that use scriptlets.
  • <ao:textarea> no longer requires cols and rows attributes.
  • Cleaned-up use of JspTagException versus JspException. Generally, methods declare throws JspException while actually throwing instances of JspTagException. The exception to this is private implementation methods that both declare and throw JspTagException.
  • Attribute setters now throw IllegalArgumentException instead of JspTagException.
  • Case-insensitive boolean parsing.

ao-taglib-5.0.2

Release Notes

ao-taglib-5.0.1

Release Notes

  • Fixed <ao:html> attribute class, getter was required in implementation due to the presence of java.lang.Object.getClass().

ao-taglib-5.0.0

Release Notes

  • Minimum Java version changed from 1.7 to 1.8.
  • Reduced use of property substitutions in pom.xml. This is to help 3rd-party parsers that fail to perform full Maven-compatible substitutions.
  • Moved HtmlTag.useXhtmlContentType(…) to new Html class, along with related constants.
  • Now writing XML declaration when both serving as XHTML and response encoding is not UTF-8.
  • Now writing HTML or XHTML doctype based on current Serialization.
  • Changed <ao:html> attribute forceHtml to serialization, which now takes values SGML, XML, or auto (the default). When auto, the following steps are performed to resolve the serialization:
    1. Use the serialization active on the current request.
    2. Use the application context-paramcom.aoindustries.encoding.Serialization.default that allows an application to control the selection of HTML versus XHTML.
    3. When this context-param is unspecified or auto, determine the serialization based on the client's Accept header.
  • <ao:html> attribute doctype now has a new value default (the default). When default, the following steps are performed to resolve the doctype:
    1. Use the doctype active on the current request.
    2. Use the application context-paramcom.aoindustries.encoding.Doctype.default that allows an application to control the default doctype.
    3. When this context-param is unspecified or default, defaults to HTML5, which results in a breaking change (this tag used to default to STRICT).
  • Now outputting HTML or XHTML based on the current response content type. This should eliminate validator warnings when used as HTML.
  • New tag <ao:br> that writes a line break in the current serialization.
  • New tag <ao:hr> that writes a thematic break (horizontal rule) in the current serialization.
  • New function ${encoding:getSerialization()} to get the current Serialization enum.
  • New function ${encoding:getDoctype()} to get the current Doctype enum.
  • Added in-context translation markup to script attributes, like onload.
  • Avoiding unnecessary coercion to String when there is no active in-context translation.
  • Avoiding unnecessary coercion to String from char[].
  • hreflang attributes now support Locale instances via Locale.toLanguageTag() instead of Locale.toString().
  • New tag <ao:col> that writes a col (column) in the current serialization.
  • <ao:bundle> implementation changed to TagSupport for compatibility with JSP scripting.
  • <ao:message> has new bundle attribute that allows specifying for one-off.
  • The <ao:html> now establishes a page context for AO Web Resources, if one is not already present on the current request.
  • Converted some attributes from Object to String:
    1. *.class
    2. *.enctype
    3. *.httpEquiv
    4. *.id
    5. *.itemprop
    6. *.name
    7. *.rel
    8. *.target
    9. *.type

ao-taglib-4.0.0

Release Notes

ao-taglib-3.0.1

Release Notes

  • Using managed dependencies:
    1. This project uses managed dependencies.
    2. This project's managed dependencies may also be imported by other projects.

ao-taglib-3.0.0

Release Notes

  • Minimum Java version changed from 1.6 to 1.7.
  • Deprecated TempFileContext in favor of new ServletTempFileContext that does not require web.xml configuration, supports additional scopes (application and session), and registers a shutdown hook to delete on JVM exit.
  • Allowing all attributes to have runtime expressions with <rtexprvalue>true</rtexprvalue>. There is no compelling reason to disable the runtime expressions, and disabling them can hinder developer options.
  • New tags for encoding in additional contexts:

ao-taglib-2.3.1

Release Notes

  • Updated dependencies.
  • Added class attribute to <ao:form> tag.

ao-taglib-2.3.0

Release Notes

  • Not encoding anchors. To avoid ambiguity, anchors must be encoded by the caller, such as already done for parameters.
  • New AO OSS Parent POM to simplify pom.xml files.
  • Project documentation moved to per-project book in SemanticCMS format.
  • Added changelog as top-level project link.
  • Added itemprop for semantic microdata.
  • Taglib tlib-version is now set automatically during build. Unfortunately, we cannot include "-SNAPSHOT" on snapshot builds due to the requirement of "Dewey decimal" for taglib versions. The unambiguous full version is annotated via comment.
  • Taglib URL changed to https://aoindustries.com/ao-taglib/ to match project URL.
  • Added support for XML DOM Node in toString type coercion.

ao-taglib-2.2.0

Release Notes

  • Improved Javadoc formatting.
  • Improved README formatting.
  • Added support for application/json and application/ld+json encoding.

ao-taglib-2.1.0

Release Notes

  • Added autocomplete attribute on input tags.

ao-taglib-2.0.1

Release Notes

  • Updated beanutils version.
  • Restored runtime expression properties used by some projects.

ao-taglib-2.0.0

Release Notes

  • Using request object instead of ThreadLocals to support asynchronous and concurrent request processing.
  • Set rtexprvalue to false where seems reasonable to do so.
  • Removed unnecessary and unused attribute getters.
  • Newer taglib version to enable deferred expressions.
  • New helper for deferred expressions.
  • Some attributes changed to deferred expressions where evaluation is not always necessary.
  • New ao:choose, ao:when, and ao:otherwise tag implementations to support deferred expressions.
  • Each lock object now a small empty class to help identify lock contention.

    The lock contention profiler in NetBeans is just showing "java.lang.Object" all over, and can't seem to get from the lock object id to the actual object in the heap dump using OQL (id not found).

ao-taglib-1.4

Release Notes

  • Minor fixes for Jetty compatibility.
  • Added optional title attribute to links.
  • Removed unnecessary exceptions from constructors.
  • Short name set to "ao" as it is commonly used.
  • May now provide link data object.

ao-taglib-1.3.1

Release Notes

  • Improved Maven configuration for Java EE 6 dependencies.

ao-taglib-1.3

Release Notes

  • Efficient way to check if objects are empty.
  • Handling empty class from JSP EL.

ao-taglib-1.2

Release Notes

  • Allowing ao-taglib style "arg" maps to be passed through Dispatcher for non-taglib use.
  • args passed unmodifiable.
  • Now throws an exception if cannot set the response content type.
  • Passing args as Map<String, ?> instead of forcing Map<String, Object>

ao-taglib-1.1

Release Notes

  • The beanutils dependency is now optional due to its limited scope in older components.
  • Reverted to Java 1.6 for Android and Java EE 6 compatibility.

ao-taglib-1.0

Release Notes

  • Project moved to GitHub and Maven.