This release uses the template parser from ng-objects now published on maven central, rather than including an entire copy of the template parser in Parsley itself. This simplifies development and ensures compatibility between the two frameworks.
We also get some new features from the ng template parser, like keeping track of the location where a parsing errors occurs, allowing us to more nicely report errors (for example, highlighting the erroneous code in the exception page like ERXExceptionPage does for errors in java code).
Other changes
- Maven groupId changed from
is.rebbi to is.rebbi.parsley so make sure to update dependency declarations.
- We no longer render HTML comments using the
WOHTMLCommentString element, instead comments are treated as any other plain HTML string. This doesn't change much except it means the -WOIncludeCommentsInResponse property doesn't do anything anymore. I suspect it's rarely used but if someone needs this functionality, we can consider bringing it back.
Experimental changes
Changes that are functional but can be considered to be in "preview mode".
Parser directives
The template parser now supports a couple of parser directives.
<p:comment></p:comment> is a "parser comment" meaning "ignore everything between these tags". Nothing is parsed so the content does not end up in the parsed template / eventual generated response.
<p:raw></p:raw> means "don't perform any parsing/processing on the content between these tags". Means any dynamic tags like <wo:str> are not processed but are passed as unparsed strings to the parsed template/ response.
parsley-ognl module
Optional module providing OGNL expression support via a ~ prefix in binding values. Currently enabled by passing in an association factory when registering parsley, using Parsley.register( new ParsleyOgnlAssociationFactory() );
Pluggable element factories per namespace
New ParsleyElementFactory interface with Parsley.registerElementFactory(namespace, factory). The wo namespace is registered by default. Ships with ParsleyHTMLElementFactory for creating WOGenericElement/WOGenericContainer from HTML element names. Can be tested by running Parsley.registerElementFactory( "html", new ParsleyHTMLElementFactory() ); after parsley's registration.
Full Changelog: https://github.com/undur/Parsley/compare/v1.3.0...v1.4.0