major
nice-to-have
defect
major
enhancement
Improvement
The model-based search language is to be extended to include the generation of HTML with embedded search expressions.
Using {{{ <HTML-source-code }}}, literal HTML fragments can be embedded in search expressions. Within these fragments, search expressions can be evaluated and output using { <search-expression> }.
Example
#!xml
{{{
<table>
{
all(`TestSearchExpression:A`)
.sort(
comparator(x -> list(
$x.get(`TestSearchExpression:A#double`),
desc($x.get(`TestSearchExpression:A#str`)))))
.map(row -> {{{
<tr class="{if($row.get(`TestSearchExpression:A#double`) > 10, 'critical')}">
<td>{$row.get(`TestSearchExpression:A#name`)}</td>
<td>{$row.get(`TestSearchExpression:A#double`)}</td>
<td>{$row.get(`TestSearchExpression:A#str`)}</td>
</tr>
}}})
}
</table>
}}}
Test
- test.com.top_logic.model.search.expr.TestSearchExpression.testHtml()