`

Use the <f:verbatim> tag for nested HTML.

阅读更多
Use the <f:verbatim> tag for nested HTML.

在写JSF代码时,发现老是有以下的异常报出:
Component with id '_idJsp7' (org.apache.myfaces.taglib.html.HtmlPanelGroupTag tag) and path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pages/calculator.jsp][Class: javax.faces.component.html.HtmlPanelGroup,Id: _idJsp7]}renders it's children, but has embedded JSP or HTML code. Use the <f:verbatim> tag for nested HTML. For comments use <%/* */%> style JSP comments instead of <!-- --> style HTML comments.

当时真是一看到红色的异常血压也就蹭蹭地上升,也就没能静下心来看看这些异常是什么意思,就条件反射地Google一下.可Google出来的又全都是英文,磕磕绊绊地看了会就放下心了.

现在心情好些再来看这个问题时,发现它远没有想像中那么可怕.人家异常里也说的很清楚.就是在写jsf页面时,有些JSF组件(如grid_panel)里是不能嵌套HTML代码了.若想硬往里写就只得用<f:verbatim> tag了.

http://gceclub.sun.com.cn/prodtech/javatools/jscreator/reference/docs/help/ui_elements/palette/jsf-val-conv/f_verbatim.html给的链接里有如下描述:
    此高级组件是一个定制 <f:verbatim/> 标记,用于将 HTML 元素添加到某些组件中,并使 HTML 元素具有这些组件的行为。将 HTML 标记包装在 <f:verbatim/> 标记中,使其具有 JavaServer Faces 组件的行为,这样便解决了同时包含 JavaServer Faces 组件和 HTML 元素的页中出现的一些问题。

  • 标记组件更易于用来将 HTML 标记添加到 JSP 页面。
       这样又顺着想起了另一个问题:现在这样是在JSP中用JSF时出的问题,那若用faclet是不是不会有这个问题了呢?若没有这个异常报出,那么这个异常也就是有JSF生命周期里的Render阶段报出啦?
4
1
分享到:
评论
1 楼 yuchang314 2009-05-08  
[img][/img]
引用

相关推荐

    30天打造更亲和力网站.rar

    How to use this License for your documents.............77 Translations..........79 Chinese.......79 Estonian......79 Finnish........79 French.........79 German.......79 Italian..........79 ...

    LZX压缩格式的微软官方的说明书

    Position footer -&gt; Verbatim bits, Aligned offset bits .......15 Match length -&gt; Length header, Length footer ........16 Length header, Position slot ?? Length/Position header...16 Encoding a match...

    Linux System Administrator Guide Version0.9

    Linux System Administrator Guide Version0.9&lt;br&gt;&lt;br&gt;Table of Contents&lt;br&gt;About This Book....................................................................................................................

    Java Server Faces API 组件标签 API Reference 速查手册

    Java Server Faces API 组件标签 API Reference 速查手册 HTML_BASIC RenderKit javax.faces.Command ...f:verbatim f:view h:column h:commandButton h:commandLink h:dataTable h:form h:graphicImage

    Jericho HTML Parser

    including some common server-side tags, while&lt;br&gt;reproducing verbatim any unrecognised or invalid HTML.&lt;br&gt;Also provides high-level HTML form manipulation functions.

    Diamond_ALL

    June 1991&lt;br&gt;&lt;br&gt; Copyright (C) 1989, 1991 Free Software Foundation, Inc.&lt;br&gt; 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA&lt;br&gt; Everyone is permitted to copy and distribute verbatim copies&lt;br&gt; ...

    Dive Into Python 中文版

    目录 第 1 章 安装 Python........................................................................................................................................7 1.1. 哪一种 Python 适合您?...

    hibernate-shards.jar

    on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may ...

    Universal-USB-Installer

    The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus...

    gvim常用插件及其配置文件配置(下载解压即可使用)

    array changebar eqlist geometry inputenc newalg polski verbatim .vim/ftplugin/latex-suite/templates: article.tex IEEEtran.tex report.tex report_two_column.tex .vim/indent: tex.vim .vim/keymap: ....

    HttpClient以及获取页面内容应用

    List&lt;NameValuePair&gt; formparams = new ArrayList&lt;NameValuePair&gt;(); formparams.add(new BasicNameValuePair("username", "admin")); formparams.add(new BasicNameValuePair("password", "123456")); ...

    WizFlow网页编辑

    on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may ...

    Apress.Learn Unity for 2D Game Development.2013

    This book is first and foremost a practical guide to making 2D games using the Unity Engine. That statement however, while informative, requires further clarification. First, the book is practical. ...

    Net开源日志组件

    1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, ...

    dive into python

    How to use this License for your documents H. GNU 自由文档协议 H.0. 序 H.1. 适用范围和定义 H.2. 原样复制 H.3. 大量复制 H.4. 修改 H.5. 合并文档 H.6. 文档合集 H.7. 独立著作聚集 H.8. 翻译 H.9....

    CICS ABEND CODE

    The information below was extracted verbatim from File #134 of the CBT tape. All that has been done was the removal of the ISPF control information. The first column contains the System or User Abend...

    屏幕截图转gif工具licecap.exe

    software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to ...

    宾馆管理系统

    if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid...

    vewa_app2:VEWA 网络应用程序

    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 安装 用法 发展 要求 要在您的机器上运行此应用程序,您至少需要: PHP &gt;=5.5 ...

    R Data Import/Export

    Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms ...

Global site tag (gtag.js) - Google Analytics