Releases: xmlet/HtmlFlow
htmlflow-4.3
-
New builder
.suspending()
to allow the use of continuations in Kotlin
with suspending functions doingawait
. -
New Kotlin extensions such as property
.l
to close tag in Kotlin, instead of.__()
-
Solved Issue #105 - new attributes in
globalEventAttributes
included in
new release 1.0.15 of HtmlApiFaster. -
New unit tests to check multi-threaded scenarios.
-
Update documentation mentioning
setIndentation()
and correct use ofthreadsafe()
htmlflow-4.2
-
Solved Issue #103 - We cannot use
.text()
interleaved with attributes and now whenever you do it HtmlFlow will throw an exception. -
Solved Issue #104 - Disabling indentation incorrectly removed newlines inside text and script blocks.
-
Solved Issues #59 #67 #102 - Improved documentation with examples of data binding, if/else, and loops usage
-
Turn
HtmlView
strongly typed with the typeM
of the model.
htmlflow-4.1
-
Do not emit HTML boolean attribute whenever it has a
false
value. -
Include new types on tag
Script
namely,module
andimportmap
. -
HtmlViewAsync
support for thread unsafe view that my run sequentially successful, despite being asynchronous in relation to the data model.
HtmlFlow-4.0
-
Replace
DynamicHtml
andStaticHtml
by newHtmlView
andHtmlDoc
. Both inherit from newHtmlPage
type. -
The factory methods
DynamicHtml.view()
andStaticHtml.view()
are now part of the classHtmlFlow
corresponding to its methodsHtmlFlow.view()
andHtmlFlow.doc()
. -
Removed the
HtmlWriter
interface which defined the standard API (methodswrite
andrender
) to any kind of HTML page in the context of HtmlFlow.
Given the dynamic requirements ofDynamicHtml
(now calledHtmlView
) we need an argument model onrender(model)
andwrite(model)
methods.
Yet, those methods were illegal forStaticHtml
(now calledHtmlDoc
) which does not depend on a model object given its static nature.
So, theHtmlWriter
disappeared and the newHtmlPage
base class does not define any write/render method. -
HtmlPage
,HtmlView
andHtmlDoc
, none of them is no more parametrized (generic) with the type of the model. Now the model is only parametrized on the use of the builder<M> dynamic(BiConsumer<E, M> consumer)
, whereE
is the parent HTML element andM
is the type of the model. -
The model object is now passed as parameter of the consumer of a dynamic block (i.e. calling the builder
.dynamic((elem, model) -> ...)
). There is no more use of closures to capture the model object. Thus, the former 3.x style of dynamic block, such as:
public void template(DynamicHtml<Pet> view, Pet pet) {
view.div().h2().dynamic(h2 -> pet.getName()).....
...
Is now on API 4.x:
public void template(HtmlPage view) {
view.div().h2().<Pet>dynamic((h2, pet) -> pet.getName()).....
...
-
Partial (aka fragments) are the only place where we may use closure to capture a model object that has a different type from the enclosure template. In that case, remember when including that partial to use a
dynamic()
block to avoid storing it internally as a static HTML block and make it render whenever you call it with a model. Yet, if the partial use the same model as its container, then it should avoid the closure and use the model received on the consumer of itsdynamic(cons)
builder. For example, for views used inside a layout view. -
Disappear the
addPartial()
builder. A partial (aka fragment) is only a consumer function of an HTML element, i.e.Consumer<E extends Element>
. Thus, you may simply combine partials through higher-order functions composition. The element is the parent HTML where HtmlFlow will continue to emit HTML. We may also use consumers with additional arguments corresponding to models (i.e. context objects) used in the partial view (i.e. HTML fragment).
HtmlFlow-3.7
Support #75 When parent template is initialized with a PrintStream
, any internal use of addPartial()
should use implicitly that PrintStream
regardless the output approach defined on the partial view instantiation.
This feature implies a couple of new internal methods including a newby()
in HtmlVisitor
that creates a new instance of same type and keeping indentation.
HtmlFlow-3.6
Fix code Smells on Generics and other uses cases. Update Junit release to suppress reported vulnerability. #68
HtmlFlow-3.5
Downgraded to target Java runtime 1.8. Some applications, such as spring-comparing-template-engines don’t support higher versions.
HtmlFlow-3.4
Frst release of Flowifier an HTML to HtmlFlow translator, developed by Julien Gouesse. Issue 43
HtmlFlow-3.2
Make views immutable.
HtmlFlow-3.1
Support non thread-safe views. Now, in order to use the same view by multiple threads you
should call the threadSafe()
method.