Knot.x 1.5.0
Release Notes
knotx-core
- PR-468 - Fragment processing failure handling (configurable fallback)
- PR-465 - Action Knot functionality moved to Knot.x Forms.
- PR-467 - fixed typo in logger format (URI already contains leading slash)
- PR-473 - mark Handlebars Knot as deprecated on behalf of Knot.x Template Engine.
knotx-dependencies
- PR-16 - Removed
knotx-adapter-commondependency - PR-15 - Configure Knot.x Template Engine in BOM file
- PR-12 - Configure Knot.x Forms in BOM file
knotx-junit5
- PR-5 - Html Markup Assertion to test html body content
knotx-forms
First release of the Knot.x Forms module that replaces Knot.x Action Knot (which is now deprecated and will be removed soon). Read more in the Upgrade notes section.
knotx-data-bridge
- PR-37 - implementation of fallback handling in data bridge
knotx-template-engine
First release of the Knot.x Template Engine module that replaces Knot.x Handlebars Knot (which is now deprecated and will be removed soon). Read more in the Upgrade notes section.
knotx-stack
- PR-36 - Cleanup integration tests
- PR-32 - Extract assembler and splitter EB addresses to globals.
- PR-33 - Knot.x Template Engine introduced instead of HBS Knot
- PR-35 - implementation of fallback handling - integration tests
knotx-example-project
- PR-33 - Update cluster to use template engine, replace mocks with simple httpd-based images
- PR-32 - Switched examples from
handlebars knottoknotx template engine, example TE strategy implementation - PR-25 - Fixed multiple-forms example. Updated Forms Knot attributes.
- PR-20 - Change
acme-action-adapter-httpto useknotx-forms - PR-35 - implementation of fallback handling in example project
Upgrade notes
Migration form Action Knot to Knot.x Forms
Knot.x (<= 1.4.0) used earlier Action Knot. Please follow step below in order to migrate your project from ActionKnot to Knotx Forms module.
Configuration file:
In your main config
application.conf, updatemodulessection from:"actionKnot=io.knotx.knot.action.ActionKnotVerticle" "actionAdapter=com.acme.adapter.action.http.HttpActionAdapterVerticle"to
"forms=io.knotx.forms.core.FormsKnot" "formsAdapter=com.acme.forms.adapter.http.FormsAdapterVerticle"and define forms in the
globalsectionglobal { address { forms { knot = knotx.knot.forms example.adapter = knotx.forms.example.adapter.http } } }Change included configuration name
actionKnot.conftoforms.conf
Page templates:
Rename data attributes accordingly:
data-knotx-on-todata-knotx-forms-on-data-knotx-actiontodata-knotx-forms-adapter-namedata-knotx-adapter-paramstodata-knotx-forms-adapter-params
In form snippet change
actiontoform.For example:
Old
<script data-knotx-knots="form-1" type="text/knotx-snippet"></script>New
<script data-knotx-knots="form-1" type="text/knotx-snippet"></script>
Custom adapter
Refactor your custom adapter to inherit io.knotx.proxy.AdapterProxy
to io.knotx.forms.api.FormsAdapterProxy
Migration form Handlebars Knot to Knot.x Template Engine
Knot.x (<= 1.4.0) used HandlebarsKnot. Please follow step below in order
to migrate your project from HandlebarsKnot to Template Engine module.
Handlebars is still the default Template Engine strategy in Knot.x. Thanks to moving into Template Engine module you may now easily create and configure your own Template Engine strategy and choose some snippets to be rendered by it. See the example project for more details.
Notice! You may still use old Handlebars Knot with Knot.x 1.5 if you want. However, remember that it is marked as @Deprecated and will be removed in the next major version.
Configuration file:
In your main config
application.conf, updatemodulessection from:"hbsKnot=io.knotx.knot.templating.HandlebarsKnotVerticle"to
"templateEngine=io.knotx.te.core.TemplateEngineKnot"Define module address in the
globalsectionglobal { ... templateEngine.address = knotx.knot.te }Replace all occurenes of the Handlebars Knot address in the Server routing
defaultFlowfrom${global.hbs.address}to${global.templateEngine.address}.Instead including
hbsKnot.confchange include totemplateEngine.conf. You will find examples configuration files in the knotx-stack distribution.
Page templates:
Update
data-knotx-knotsvalues fromhandlebarstote.Example helpers:
string_equalsandencode_urithat were embedded into Handlebars Knot are no longer available in the Template Engine. You may introduce them by defining handlebars extension as it is presented in the example project.