Skip to content

Commit 1d292ea

Browse files
committed
Sync documentation of main branch
1 parent 6959d44 commit 1d292ea

File tree

6 files changed

+456
-435
lines changed

6 files changed

+456
-435
lines changed

_generated-doc/main/config/quarkus-all-config.adoc

Lines changed: 139 additions & 139 deletions
Large diffs are not rendered by default.

_generated-doc/main/config/quarkus-websockets-next.adoc

Lines changed: 139 additions & 139 deletions
Large diffs are not rendered by default.

_generated-doc/main/config/quarkus-websockets-next_quarkus.websockets-next.adoc

Lines changed: 139 additions & 139 deletions
Large diffs are not rendered by default.

_versions/main/guides/qute-reference.adoc

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -774,11 +774,11 @@ A loop section may also define the `{#else}` block that is executed when there a
774774
[[if_section]]
775775
==== If Section
776776

777-
The `if` section represents a basic control flow section.
777+
The `{#if}` section represents a basic control flow section.
778778
The simplest possible version accepts a single parameter and renders the content if the condition is evaluated to `true`.
779779
A condition without an operator evaluates to `true` if the value is not considered `falsy`, i.e. if the value is not `null`, `false`, an empty collection, an empty map, an empty array, an empty string/char sequence or a number equal to zero.
780780

781-
[source]
781+
[source,html]
782782
----
783783
{#if item.active}
784784
This item is active.
@@ -788,68 +788,91 @@ A condition without an operator evaluates to `true` if the value is not consider
788788
You can also use the following operators in a condition:
789789

790790
|===
791-
|Operator |Aliases |Precedence (higher wins)
791+
|Operator |Aliases |Precedence |Example | Description
792792

793793
|logical complement
794794
|`!`
795-
| 4
795+
|4
796+
|`{#if !item.active}{/if}`
797+
|Inverts the evaluated value.
796798

797799
|greater than
798800
|`gt`, `>`
799-
| 3
801+
|3
802+
|`{#if item.age > 43}This item is very old.{/if}`
803+
|Evaluates to `true` if `value1` is greater than `value2`.
800804

801805
|greater than or equal to
802806
|`ge`, `>=`
803807
| 3
808+
|`{#if item.price >= 100}This item is expensive.{/if}`
809+
|Evaluates to `true` if `value1` is greater than or equal to `value2`.
804810

805811
|less than
806812
|`lt`, `<`
807813
| 3
814+
|`{#if item.price < 100}This item is cheap.{/if}`
815+
|Evaluates to `true` if `value1` is less than `value2`.
808816

809817
|less than or equal to
810818
|`le`, `\<=`
811819
| 3
820+
|`{#if item.age <= 43}This item is young.{/if}`
821+
|Evaluates to `true` if `value1` is less than or equal to `value2`.
812822

813823
|equals
814824
|`eq`, `==`, `is`
815825
| 2
826+
|`{#if item.name eq 'Foo'}Foo item!{/if}`
827+
|Evaluates to `true` if `value1` is equal to `value2`.
816828

817829
|not equals
818830
|`ne`, `!=`
819831
| 2
832+
|`{#if item.name != 'Bar'}Not a Bar item!{/if}`
833+
|Evaluates to `true` if `value1` is not equal to `value2`.
820834

821835
|logical AND (short-circuiting)
822836
|`&&`, `and`
823837
| 1
838+
|`{#if item.price > 100 && item.isActive}Expensive and active item.{/if}`
839+
|Evaluates to `true` if both operands evaluate to `true`.
824840

825841
|logical OR (short-circuiting)
826842
|`\|\|`, `or`
827843
| 1
844+
|`{#if item.price > 100 \|\| item.isActive}Expensive or active item.{/if}`
845+
|Evaluates to `true` if one of the operands evaluates to `true`.
828846

829847
|===
830848

831-
.A simple operator example
832-
[source]
833-
----
834-
{#if item.age > 10}
835-
This item is very old.
836-
{/if}
837-
----
849+
For `>`, `>=`, `<`, and `\<=` the following rules are applied:
850+
851+
* Neither of the operands may be `null`.
852+
* If both operands are of the same type that implements the `java.lang.Comparable` then the `Comparable#compareTo(T)` method is used to perform comparison.
853+
* Otherwise, both operands are coerced to `java.math.BigDecimal` first and then the `BigDecimal#compareTo(BigDecimal)` method is used to perform comparison.
854+
855+
NOTE: Types that support coercion include `BigInteger`, `Integer`, `Long`, `Double`, `Float` and `String`.
856+
857+
For `==` and `!=` the following rules are applied:
858+
859+
* Operands are first tested using the `java.util.Objects#equals(Object, Object)` method. If it returns `true` the operands are considered equal.
860+
* Otherwise, if both operands are not `null` and at least one of them is an instance of `java.lang.Number`, then operands are coerced to `java.math.BigDecimal` and the `BigDecimal#compareTo(BigDecimal)` method is used to perform comparison.
838861

839862
Multiple conditions are also supported.
840863

841864
.Multiple conditions example
842-
[source]
865+
[source,html]
843866
----
844867
{#if item.age > 10 && item.price > 500}
845868
This item is very old and expensive.
846869
{/if}
847870
----
848871

849-
Precedence rules can be overridden by parentheses.
872+
The default precedence rules (higher precedence wins) can be overridden by parentheses.
850873

851874
.Parentheses example
852-
[source]
875+
[source,html]
853876
----
854877
{#if (item.age > 10 || item.price > 500) && user.loggedIn}
855878
User must be logged in and item age must be > 10 or price must be > 500.
@@ -859,7 +882,7 @@ Precedence rules can be overridden by parentheses.
859882

860883
You can also add any number of `else` blocks:
861884

862-
[source]
885+
[source,html]
863886
----
864887
{#if item.age > 10}
865888
This item is very old.

_versions/main/guides/websockets-next-reference.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ include::_attributes.adoc[]
1313
:categories: web
1414
:topics: web,websockets
1515
:extensions: io.quarkus:quarkus-websockets-next
16-
:extension-status: experimental
1716

1817
include::{includes}/extension-status.adoc[]
1918

_versions/main/guides/websockets-next-tutorial.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ include::_attributes.adoc[]
1010
:summary: This guide explains how your Quarkus application can utilize web sockets to create interactive web applications. This guide uses the WebSockets Next extension
1111
:topics: web,websockets
1212
:extensions: io.quarkus:quarkus-websockets-next
13-
:extension-status: experimental
1413

1514
This guide explains how your Quarkus application can utilize web sockets to create interactive web applications.
1615
In this guide, we will develop a very simple chat application using web sockets to receive and send messages to the other connected users.

0 commit comments

Comments
 (0)