How to replace tomhawk htmltag as we want to remove tomahawk from the project

150 Views Asked by At

We are migrating because tomahawk is not supporting jakarata-ee

<t:htmlTag value="ul">
    <t:htmlTag value="li">
        <h:commandLink action="searchPage" id="search" forceId="true">
            <h:outputText value="&nbsp;&nbsp;#{bean.menu_search}" escape="false" />
        </h:commandLink>
    </t:htmlTag>
    <t:htmlTag value="ul">
        <t:htmlTag value="li" style="display: none;">
            <h:commandLink id="search_results" forceId="true"
                action="searchResultsPage">
                <h:outputText value="&nbsp;&nbsp;#{bean.menu_selection}"
                    escape="false" />
            </h:commandLink>
        </t:htmlTag>
    </t:htmlTag>

We are using jakarta faces and prime faces in project

1

There are 1 best solutions below

4
BalusC On

The <t:htmlTag> is basically a leftover of JSF 1.0 when it wasn't possible to embed plain vanilla HTML in a JSF page without fiddling with <f:verbatim> tags. The <t:htmlTag> made it less opaque.

However, since JSF 1.2 it's not necessasy anymore to use <f:verbatim> let alone <t:htmlTag> in order to embed plain vanilla HTML in a JSF page. You can just use plain vanilla HTML right away.

In other words, the replacement of

<t:htmlTag value="ul">
    ...
</t:htmlTag>

would simply have been the plain vanilla HTML tag represented by the value attribute of the original <t:htmlTag> component:

<ul>
    ...
</ul>

See also:

Related Questions in JAKARTA-MIGRATION