Mix HTML and JSF in a JSF subview

后端 未结 1 1817
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-28 06:57

The problem I have today is about dealing with HTML in an included JSP, with JSF. So here\'s the situation : I use JSF 1.2 by IBM on RAD with Websphere v6.1 I have a custom comp

1条回答
  •  闹比i
    闹比i (楼主)
    2021-01-28 07:37

    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:

    
        
    myLegend

    0 讨论(0)
提交回复
热议问题