Skip to content

Releases: xmlet/HtmlFlow

htmlflow-4.3

15 Jan 11:15
Compare
Choose a tag to compare
  • New builder .suspending() to allow the use of continuations in Kotlin
    with suspending functions doing await.

  • 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 of threadsafe()

htmlflow-4.2

28 Dec 10:48
Compare
Choose a tag to compare
  • 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 type M of the model.

htmlflow-4.1

14 Dec 09:13
Compare
Choose a tag to compare
  • Do not emit HTML boolean attribute whenever it has a false value.

  • Include new types on tag Script namely, module and importmap.

  • HtmlViewAsync support for thread unsafe view that my run sequentially successful, despite being asynchronous in relation to the data model.

HtmlFlow-4.0

01 Feb 11:16
Compare
Choose a tag to compare
  • Replace DynamicHtml and StaticHtml by new HtmlView and HtmlDoc. Both inherit from new HtmlPage type.

  • The factory methods DynamicHtml.view() and StaticHtml.view() are now part of the class HtmlFlow corresponding to its methods HtmlFlow.view() and HtmlFlow.doc().

  • Removed the HtmlWriter interface which defined the standard API (methods write and render) to any kind of HTML page in the context of HtmlFlow.
    Given the dynamic requirements of DynamicHtml (now called HtmlView) we need an argument model on render(model) and write(model) methods.
    Yet, those methods were illegal for StaticHtml (now called HtmlDoc) which does not depend on a model object given its static nature.
    So, the HtmlWriter disappeared and the new HtmlPage base class does not define any write/render method.

  • HtmlPage, HtmlView and HtmlDoc, 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), where E is the parent HTML element and M 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 its dynamic(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

09 Apr 13:51
Compare
Choose a tag to compare

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

09 Apr 13:50
Compare
Choose a tag to compare

Fix code Smells on Generics and other uses cases. Update Junit release to suppress reported vulnerability. #68

HtmlFlow-3.5

09 Apr 13:49
Compare
Choose a tag to compare

Downgraded to target Java runtime 1.8. Some applications, such as spring-comparing-template-engines don’t support higher versions.

HtmlFlow-3.4

18 Dec 16:48
Compare
Choose a tag to compare

Frst release of Flowifier an HTML to HtmlFlow translator, developed by Julien Gouesse. Issue 43

HtmlFlow-3.2

10 Nov 11:49
Compare
Choose a tag to compare

Make views immutable.

HtmlFlow-3.1

10 Nov 11:44
Compare
Choose a tag to compare

Support non thread-safe views. Now, in order to use the same view by multiple threads you
should call the threadSafe() method.