- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我定义了一个复合组件(实际上是几个),当我尝试重新渲染一个插入了 的组件时我收到提到的错误:
<f:ajax> contains an unknown id ':contentFrm' - cannot locate it in the context of the component j_idt40
<et:pageContent formId="contentFrm">
<h:form id="contentFrm">
<div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="styleClass" default="access-box-content alpha omega grid-12" />
<composite:attribute name="formId" default="#{cc.attrs.id}" />
</composite:interface>
<composite:implementation>
<h:form id="#{cc.attrs.formId}">
<div class="#{cc.attrs.styleClass}">
<composite:insertChildren/>
</div>
</h:form>
</composite:implementation>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition id="landing" xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:et="http://java.sun.com/jsf/composite/components"
template="/layout/template.xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:define name="main-content">
<et:pageTitle title="#{msg.trx_lastTrx}" />
<et:tabBar formId="currentTrxFrm">
<et:tab bean="#{accountTransactionBacking}"
prompt="#{msg.trx_currentTrxs}"
reRender=":contentFrm"
tabId="1"
active="true"/>
</et:tabBar>
<et:pageContent formId="contentFrm">
<et:tabContentPanel rendered="#{accountTransactionBacking.selectedTab ==1}">
<ui:include src="/app/summary/currentTrxRG.xhtml" rendered="#{accountTransactionBacking.selectedTab ==1}"/>
</et:tabContentPanel>
</et:pageContent>
</ui:define>
</ui:composition>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition id="landing" xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:et="http://java.sun.com/jsf/composite/components"
template="/layout/template.xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:define name="main-content">
<et:pageTitle title="#{msg.ls_lastStatement}" />
<et:tabBar formId="acctSummTabFrm">
<et:tab/>
</et:tabBar>
<et:pageContent formId="accountButtonsFrm">
....
<et:div styleClass="accountSummaryLines" divId="lastStatementLines">
<ui:repeat var="row" value="#{lastStatementBacking.lines.data}">
<h:outputText escape="false" value="#{row}" styleClass="grid-12 lastStatementDetail"/><br></br>
</ui:repeat>
</et:div>
<et:div styleClass="access-box-footer">
<h:commandButton styleClass="left" action="#{lastStatementBacking.lines.prevPage}" value="#{msg.buttonPrevPage}" style="float:left;">
<f:ajax render="accountSummaryLines" />
</h:commandButton>
<h:commandButton styleClass="right" action="#{lastStatementBacking.lines.nextPage}" value="#{msg.buttonNextPage}">
<f:ajax render="accountSummaryLines" />
</h:commandButton>
</et:div>
</et:pageContent>
</ui:define>
</ui:composition>
最佳答案
无法找到它,因为复合组件本身就是一个 NamingContainer
.真正有效的客户端 ID 将是 :idOfComposite:contentFrm
哪里idOfComposite
是复合组件本身的(自动)生成的 ID。如果您在 webbrowser 中查看源代码并找到 <form>
有问题,然后你会看到它。
你需要给复合组件一个固定的ID
<et:pageContent id="contentFrm">
<div>
或
<span>
.
<composite:implementation>
<div id="#{cc.id}">
<h:form>
<div class="#{cc.attrs.styleClass}">
<composite:insertChildren/>
</div>
</h:form>
</div>
</composite:implementation>
关于ajax - 错误 : <f:ajax> contains an unknown id when used with composite:insertChildren,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9814510/
我正在开始开发一个使用 JSF 2 作为 View 技术的新 Web 应用程序。 我之前没有使用 JSF 的经验,对这些概念有点困惑。 我阅读了一些关于 JSF 的文档,主要思想是它是一个基于组件的框
我试图找出这是一个 JSF/EL 问题还是这里出了什么问题。 基本上,我想将项目对象作为 ui:param 传递给 ui:composition 并在里面有一个按钮(即引导按钮,因此它们实际上是 ht
我是 GWT 的新手,正在尝试制作一个简单的应用程序(例如 fmylife 的小型版本)。到目前为止,我制作了一个加载事实的复合 Material 和另一个具有提交新事实的表单的复合 Material
我对 Agda 很陌生,我正在尝试做一个简单的证明“ map 的组合就是组合的 map ”。 (来自 this course 的练习) 相关定义: _=$=_ : {X Y : Set}{f f' :
我有三个组合(compFinal、compSlide1 和 compSlide2)。 我已经使用脚本将 compSlide1 和 compSlide2 添加到 compFinal 组合中。 我使用以下
我有以下情况: #{cc.attrs.someValue} 因此,在我的复合组件中,我正在调用其他一些复合组件,并尝试将提供给“主”复合组件的参数
我正在尝试使用 Constraint composition并希望为每个复合约束定义组,如下例所示:- 复合约束 @Target({ ElementType.FIELD, Elemen
尝试使用 Jetpack Compose 显示 AlertDialog,但应用程序在调用 AlertDialog 函数时崩溃,错误为 java.lang.IllegalStateException:
我想根据按钮的可见性属性重绘组合中的按钮。我根据其中的按钮进行合成以调整大小,并且我正在使用以下代码来刷新合成。问题:下面的代码工作正常,但按钮从未在复合中重新定位请帮忙。代码中是否缺少要重新定位的内
我正在研究 After Effects 脚本并使用 AE 脚本指南作为学习基础。 我有一个 After Effect 项目,其中包含两个 AE 项目,并且每个项目中都有多个项目。 我想从具有特定名称的
我一直在学习如何在 python 编程中实现组合,但我很难理解为什么它比继承更受欢迎。 例如,这是迄今为止我的代码: class Particle: # Constructor (public)
概述 是一种结构型模式,将对象以树形结构组织起来,以表示“部分 - 整体”的层次结构,使得客户端对单个对象和组合对象的使用具有唯一性。 UML类图 上面的类图包含的角色: Compone
我们已经尝试去定义类。定义类,就是新建了一种类型(type)。有了类,我们接着构造相应类型的对象。更进一步,每个类型还应该有一个清晰的接口(interface),供用户使用。 我们可以在一个新类的
一、Options API的弊端 Options api的一大特点就是在对应得属性中编写对应的模块。比如data定义数据、methods中定义方法、computed中定义计算属性、watch中监听属性
我正在使用 SWT ScrolledComposite,但是当我在 Windows 中滚动时,如果我快速滚动,我会出现一些撕裂/闪烁。我该怎么做才能加倍缓冲或减少这种影响,或者我该怎么做才能覆盖默认滚
在 JSP 和 JSTL 中我通常会做这样的事情: ${user.name} ${user.description}
几周以来,我们的 Web 应用程序出现了性能问题。首先我们认为问题属于大 DOM。大 DOM 并不是很好,但这不是主要的性能问题。 问题在于复合组件。过去几周,我们开发了核心复合组件,以减少代码冗余并
如何在 mySQL 中创建复合主键。在 table1 中,我需要将 id1、id2 设置为复合主键。我使用了这个查询。但它使每个成为主键。它检查每个条目的重复项 ALTER TABLE `table1
我是 Java 的新手,我想将背景图像添加到 Composite。我只能使用 SWT,不能使用 JFace。我正在使用 eclipse indigo IDE (3.8),当我想设置背景图像时,首先我将
我有一个程序必须使用复合键来管理对象。这个键,简单来说就是几个字符串。 我有以下代码: public struct MyKey { public string Part1 { get; set
我是一名优秀的程序员,十分优秀!