Mix HTML and JSF in a JSF subview

假装没事ソ 提交于 2019-12-02 08:37:01

First of all, that's recognizeable as legacy JSF 1.0/1.1 behaviour. The f:verbatim was indeed required to take template text into the JSF component tree. However, the f:verbatim is entirely superfluous since the new view handler of the 2006's JSF 1.2 which automatically takes any template text inside f:view into the component tree. Thus, are you really using JSF 1.2? Websphere 6.1 ships with builtin JSF 1.1 libraries and upgrading to 1.2 isn't as easy as just placing libs in /WEB-INF/lib.

As to your actual problem, you need to wrap only template text with f:verbatim, not worthfully JSF components. Thus, the following should work:

<f:verbatim>
    <div id="myDivId">
        <fieldset>
            <legend>myLegend</legend>
</f:verbatim>
<h:outputText value="#{myBean.someContent}"></h:outputText>
<!-- HERE are a lot of JSF components, selectItems, inputText... -->
<f:verbatim>
        </fieldset>
    </div>
</f:verbatim>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!