.
had to change the css handling for error/required. Mainly had to change like this: .${cssId}-input.error to .${cssId}-input_error
api: added ZProperty.label property. This is intended to be used in Error messages for a property.
api: added ZOperation.exec method
demo: added sample AJAX form http://ztemplates.org/samples-form/
api: added ZProperty dependsOn in constructor. Now can declare which property depends on which and use ZProperty.updateValue and updateState to update form state depending on ajax trigger. Does topological sort on dependency graph to call updateValue methods in right order and only once.
api: added ZProperty.updateValue and updateState for use in AJAX form processing
api: added @ZMatch.form property and callbacks before/after form called before and after form parameters are assigned to action-pojo. Use to initialize form object.
feature: added AJAX form validation and management support when using ZProperty.
feature: added ZExposeJSON annotation to allow exposing server side form state to json object usable for ajax form manpulation.
api: added ZIRenderService.getCssId
feature: now can override cssId by defining a getter getCssId in your view-pojo to override default styles.
api: ZProperty.parse and ZProperty.format are now public, change your definitions from protected to public
bugfix: for WEB-INF/classes bug https://sourceforge.net/tracker/index.php?func=detail&aid=2023972&group_id=157577&atid=804385
api: for easier form processing: now can specify form in @ZMatch parameter definition example: @ZMatch(value = "/", parameters = {"myform.prop1"}) Define a getter for myform and a property prop1 in myform.
api: removed class ZI18n, use ZIMessageService instead which allows to override the default messages.
api: added ZIMessageService to allow easy way to plug in error-messages and i18n.
api: added boolean ZOperation.isCalled to permit execution check for form operations.
api: changed the service creation mechanism. Extend the service implementation or add new service by adding your own ServletContextListener to register your own service factory.
impl: removed dangling references in ZTemplates, that kept some objects longer around than needed
impl: removed the dependency from servlet spec 2.5 containers, now runs in tomcat 5
impl: internal refactoring, dependency cleanup
bugfix: fixed http://sourceforge.net/tracker/index.php?func=detail&aid=2004808&group_id=157577&atid=804385
tomcat 6.0.16 problem
api: now you can create action-pojos with a private default (no arguments) constructor. ztemplates will make the no arguments constructor accessible and call it when handling actions.
internal-api: changed classpathservice api to allow access to class by inputstream
impl: extracted ztemplates-classpath as a separate project zclasspath
, as it is also used in ztest
You will have to add the jar to your project
api: added carousel component http://billwscott.com/carousel
api: added star rating component
feature: added ztests
that allow you to check and enforce your application architecture!
api: ztemplates will merge, minify, compress and cache the js and css files from @ZScript to improve performance using JSMin
. YUI Compressor
did not work for all js files...
bugfix: fixed zscript-cycle bug
api: removed ZTemplates.getClasspathService. Access it under ZTemplates.getApplicationService()
api: added ZTemplates.getApplicationService()
impl: internal refactorings to reduce dependencies and improve testability. Reduced dependencies to Java Servlet classes.
impl: secured the admin info /ztemplates/admin with role ztemplates-admin
api: added support for FreeMarker
, which seems to be somewhat faster than Velocity. See article in javaworld
Support consists of ZFreeMarkerContextListener for initialisation and ZFreeMarkerRenderer for rendering
impl: removed all Velocity dependencies from ztemplates. Now could deploy without velocity.jar
config: extracted Velocity startup code from ZTemplatesContextListener and put it into separate ZVelocityContextListener. Reason: now you can choose not to use Velocity at all and use FreeMarker or other technology instead. You could also provide your own startup code. You will have to update your existing web-xml
<!-- this must come first --> <listener> <listener-class> org.ztemplates.web.ZTemplatesContextListener </listener-class> </listener> <!-- add this for Velocity support --> <listener> <listener-class> org.ztemplates.web.velocity.ZVelocityContextListener </listener-class> </listener> <!-- add this for FreeMarker support --> <listener> <listener-class> org.ztemplates.web.freemarker.ZFreeMarkerContextListener </listener-class> </listener>
api: Properties -- added ZListProperty, ZStringListProperty, ZBigDecimalListProperty, ZDateListProperty, ZLongListProperty, ZIntListProperty. Now one url variable can carry multiple values, separated by separator, default "-".
api: removed the shouldGenerateComments initParameter for performance reasons
config: added context-parameter to speed up application startup. This will restrict class scan at application startup to files accepted by the filter.
<!-- uncomment to optimize application startup time -->
<!--
<context-param>
<param-name>ZClassPathFilter</param-name>
<param-value>com.yourcompany.YourClassPathFilter</param-value>
<description>
Restrict classpath scan to jars/classes known to contain ztemplates-relevant classes.
Best YourClassPathFilter extends ZDefaultClassPathFilter
</description>
</context-param>
-->
api: changed @ZScript variable handling, now the pojo(component) that exposes the ZScript has to provide variable value. Reason: better encapsulation and more typesafe: component can ask for values needed in constructor.
api: when using ZProperty annotation @ZGetter and @ZSetter are no longer required.
impl: added caching with version number for ztemplates.css
impl: if ZScript dependency graph has cycles, only will display warning and remove dependency edges till no more cycles in dependency graph instead of failing
api: added some classes from ztemplates-YUI, mainly the JS/JSON-related.
api: added http://www.json.org
classes for JSON
api: added accordion component from http://www.hedgerwow.com/360/mwd/accordion/demo.php
and made it look like YUI-sam, fixed IE bug (flicker when collapsing)
docu: added example for Google AJAX Search
api: added netvibes rss reader component
api: refactorings, moved js base classes to ztemplates, renamed moved classes from Y... to Z...
api: added support for autocomplete from JS Array and Flat file from server.
impl: added an expires header to response for js files to avoid reloading.
api: added sample Adobe Flex/Flash
integration.
api: added ZIRenderService.createJavaScriptId for creating per request unique ids to use in AJAX code.
api: added support for google searchkey: now can use ${varname} in zscript value. ${varname} will be replaced at runtime with matching value exposed in render-pojo where @ZRenderer(zscript=true).
impl: added overlay http://www.tagger24.com/feeds/1
then place mouse over text.
impl: added menu See running example at http://www.tagger24.com
impl: added sample google AJAX search with configurable keys. See running example at http://www.tagger24.com/tag/Clinton
impl: added sample jfreechart
impl: added slider
impl: refactored, now can set properties for constructor in all widgets
impl: removed the YUI files from ztemplates-yui.jar to allow simple upgrades. Now only download latest yui_x.x.x.zip, rename to yui_x.x.x.jar and place into WEB-INF/lib.
impl: added sample tooltip, dialog and overlay
impl: added a AJAX google-search implementation (can see it in action under tagger24.com
) then klick a tag.
feature: adding support for easy integration of AJAX components like YUI YahooUI
integration
sample: added ztemplates-yui project that shows how to integrate ztemplates and YUI. This is not intended to be reused but as an example on how to do it. If someone is interested he could contribute to ztemplates by expanding this to a reusable library. Contact me at dev //@// gerdziegler //.// de
feature: added @ZScript annotation. Provides support for <script src="" type="text/javascript"> declarations on render-pojos that are collected and aggregated by ztemplates, so you need not worry how to deploy the javascript libs in AJAX applications. Also applies to css.
feature: added /ztemplates/admin application for infos about ztemplates, like url matching tree
feature: added 'contextPath' and 'zscript' to the default exposed values to the context when used in webapp. Exposed values can now be controlled by the @ZRenderer annotation.
optimization: the filter now caches urls it cannot match and dispatches without trying to match the url again.
bugfix: removed a api dependeny from ServletContext.getContextPath that allowed deployment only in newer web-containers.
api: renamed ZVelocityContextListener to ZTemplatesContextListener and moved it to org.ztemplates.web, because velocity is used by ztemplates itself and there are other initialisation tasks to be performed too. you will need to update your web.xml.
feature: added support for matching variable values which contain '/': use *{var} notation in your templates. Useful for accessing resources from a action-pojo deployed in a jar, in this case ztemplates-yui.jar Makes ZResourceServlet obsolete, will be removed from this version. you will need to update your web.xml
impl: replaced the regex matching algorithm with a tree-based one. Allows better url collision detection.
impl: at first request, the match tree is print to console
api: class ZUrl and ZServletUrl are no longer available. Use ZTemplates.getServletService().createUrl()to create urls.
api: ZIServletService.createUrl() now throws Exception
api: renamed ZISecurityService to ZIEncryptionService
api: added @ZSecure annotation for access-control on action-pojos. Transparently creates secure url and triggers j2ee login. Checks for roles.
api: added ZISecurityService that provides support for the @ZSecure annotation
api: added ZIExceptionService that allows to plug in a custom exception handler
api: made the setter methods in ZTemplates public so you can mock up everything for unit-tests
api: added service configuration through web.xml. Full control over the services with init-parameters on servlet
<init-param> <param-name>service:org.ztemplates.web.ZIExceptionService</param-name> <param-value>org.ztemplates.web.impl.ZExceptionServiceImpl</param-value> </init-param>
api: ability to define your own services analogous to the built in services
api: added ZIServiceFactory/ZIServiceRepository that can be set on ZTemplates (in ThreadLocale) so you can provide/mock your own implementation
form-api: renamed ZOperationProperty to ZOperation
form-api: if you use ZProperty for the url-variables, ztemplates will automatically call the revalidate method, first for ZProperty and then for ZOperation.
form-api: ZOperation now accepts other properties in the constructor. Its validation state will be marked as error if one of the other properties have an validation error.
api: a empty string assigned to a ZProperty will now be considered as null value.
impl: sorted the regex pattern created by the engine to avoid collisions and random behavior, so the most concrete pattern will be matched first. The patterns are looged out at startup, so you can see whats going on.
api: added new default value named 'cssId' to default exposed values that can be used to make css-styles refactoring safe. It contains a unique id that can be used in both template and css. In css use it like ${cssId} because it uses velocity to create the css.
api: ZProperty.revalidate returns boolean true if validation succeeded
api: added ZBigDecimalProperty
api: moved ZIRenderService to org.ztemplates.render. A instance will always be exposed to the template under the name renderService, so now you can do $renderService.render($obj) from the template.
bugfix: reading null value from property throws exception
api: removed need to specify both @ZSetter and @ZGetter annotation when using ZProperty
feature: changed ZIServletService.sendRedirect so that it also works with Strings as parameter
api: added more properties in properties package
api: added context param to web.xml that enables template info in html comments if set to true.
Defaults to false if not set
<context-param>
<param-name>shouldGenerateComments</param-name>
<param-value>true</param-value>
<description>Enable template details in output</description>
</context-param>
see also Bug Tracker
api: added support for css fragments. Put css into a file in the same directory as the class annotated with @ZRenderer. ztemplates scans the classpath and aggregates all found css to a css-stylesheet accessible with <LINK rel="stylesheet" href="/your-contextPath/ztemplates.css">
api: added property-framework, that bundles values, validation state and formatting/parsing.
api: added method sendRedirect(action) to ZIServletService
api: added method createUrl(action) to ZIServletService
bugfix: url-variables are not correctly url-encoded, so assigned values are scrambled for umlaut or space. fixed
api: added support for encryption in ZTemplates.getSecurityService().encrypt/decrypt.
api: annotations now override convention ZGetter/getXxx @ZSetter/setXxx
bugfix: parameters are ignored when creating a url
bugfix: init methods need to be annotated with @ZInit to be called
functionality: changed default parameter setter behavior: if parameter comes with empty string as value will assign null to parameter instead of empty string.
api: added access to the ZClasspathService through ZTemplates.getClasspathService(), that allows the application to search for classes in the classpath by annotation or by assignableFrom. Gives the webapps access to the same auto-discovery features as the framework.
api: removed the ZRenderServlet, as only the filter is really needed.
api: removed the @ZParameter annotation. Functionality was moved to @ZMatch that now declares the complete url format.
api: ztemplates-actions made everything refactoring-safe by introducing the following (facultative) annotations:
bugfix: render-pojos must be in some package, default package not allowed. as usually pojos are always in some package.
bugfix: if url from browser ends with '/' won't match. Fix by always removing trailing '/' before matching
bugfix: urls starting with a ${variable} will match empty strings.
examples: added Pageable Sortable List example
06.11.2007 Split the project in three, independent parts: