- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我创建了一个复合组件,它在 ui:repeat 中嵌入了一个 commandLink。我需要能够动态更改通过 commandLink 的 action 属性调用的方法,但由于您需要在
由于 commandLinks 在 UI:repeat 中,它们都有一个动态 ID。
作为解决方法,我尝试在命令链接上使用 setPropertyActionListener。但是,看起来该方法从未被调用过。我错过了什么吗?这是实现我想要的目标的错误方法吗?
这是一些示例代码。
复合组件:
<ui:repeat value="#{cc.attributes.value}" var="aUser">
<li class="ui-widget-content ui-state-default q-userListResult">
<p:commandLink
styleClass="q-userList-resultLink"
update=":userList:q-userList-formUsers:userToolTip">
<f:setPropertyActionListener value="{aUser}" target="#{cc.attributes.resultLinkActionListener}"/>
使用页面:
<q:userList id="userList"
value="#{caseWizardBackingBean.companyContacts}"
renderHeader="false"
resultLinkActionListener="#{caseWizardBackingBean.selectedCompanyContact}"/>
bean 类:
private CTProfile selectedCompanyContact;
public CTProfile getSelectedCompanyContact() { return this.selectedCompanyContact; }
public void setSelectedCompanyContact(CallTrackProfile ctp) { this.selectedCompanyContact = ctp; }
我尝试将一些调试语句和断点添加到属性的 getter 和 setter 中,但它们从未被命中。我猜发生了一些奇怪的事情,因为我能找到的所有示例都表明这应该有效(但它们不使用复合组件)。
我应该指出,我使用的是 Primefaces commandLink,但这似乎也发生在常规 commandLink 上。
最佳答案
好的,据我所知,这在当前版本的 JSF (2.1.3) 中无法完成。
为了解决这个问题,我将组件设为单个 commandLink,然后使用页面在其中包含一个 ui:repeat 和 commandLink。
关于jsf-2 - ui :repeat with a composite component 内 commandLink 上的 setPropertyActionListener,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7325614/
今天我有一个非常简单的任务需要帮助。首先让我解释一下我的环境。我们正在使用 Java/Hibernate/SEAM/Facelets/JSF/RichFaces 和 A4J 设置..我对此了解不多。
f:param与 h:link 配合使用效果很好,但不是 p:commandLink或 h:commandLink . 例如,我有两页 test_first.xhtml和 test_second.xh
我最近开始做一些JSF工作-在此之前,我一直使用PHP或Python进行Web开发。 当我发现使用h:commandLink标记时,JSF使用HTTP POST进行导航时,我感到有些惊讶。 我一直在使
环境:Tomcat 6、jsf 2.0、prime faces 2.2.1、chrome 浏览器 我想单击左侧伸展树(Splay Tree)中的“查看详细信息”链接并显示产品的详细信息。但下面的代码不
我正在尝试在我的应用程序 (Seam/RichFaces) 中显示购物车,并包含“从购物车中删除”旁边的每个项目以从购物车中删除该项目。当我单击该链接时,它应该重新呈现购物车内容以显示该项目已被删除。
当我创建一个包含分面的复合组件并在该分面内放置一个命令链接时,我收到一条错误消息:This link is disabled as it is not nested within a JSF form
我对 有疑问.我想制作悬停效果,但无法将图像加载到 通过 CSS。 CSS: .accountEditBtn { background-image: url('#{request.c
我是新手,但我的操作没有被触发。在 a4j:commandLink id="linklogout"中,我添加了一个不起作用的新操作 menubean.resetMenuActionVariables
我的树表中有很多命令链接,我动态构建它们,如果我想在单击一个命令链接时更改它的颜色,所有命令链接都会更改它们的颜色,我不知道如何做更改此指定链接的颜色,因为我不知道她的号码或 ID,如果有人知道答案,
我有以下 XHTML: TODO supply a title
我有一个包含两个 JSP 的 JSF 应用程序:login.jsp 和 main.jsp。 我有以下 faces-config.xml: package.programs.scorecard.b
写作能力不足请谅解。 我正在测试制作自定义凭证提供程序。我想创建一个 CommandLink 来对提交按钮做同样的事情。我想通过 CommandLink 与“提交”按钮分开登录。目前,只有自定义凭证提
我正在开发一个 JSF 应用程序并想要一个简单的功能 - 单击命令按钮并显示一个命令链接。我做了一个测试。代码: function testfunc() { docu
我在我的应用程序中使用了 icefaces commandLink,我想在水印中添加一个图标。我在 commandLink 中添加了一个属性 styleCss="disconnect",但在渲染过程中
这是我的代码。我在面板网格内有两个图像,这两个图像放置在动画 Javascript 渐变之上。当左侧图像与右侧的注销图标平行放置时(如图所示),注销功能不起作用。当我删除左侧图像时,注销功能正在运行。
我想知道是否可以将 h:commandLink 嵌套到 h:outputFormat 消息中,例如: 消息.属性 disclaimerLink=Click {0] for Disclaimer 现在我
谁能告诉我如何在 WPF 窗口中添加 CommandLink 控件? 这就是我所说的 CommandLink 的意思:http://msdn.microsoft.com/en-us/library/a
如何使用 commandLink 显示图标: outputText (Add) 不可见。 commandLink 支持图标的正确方法是什么?谢谢。 最佳答案
我在延迟加载 Primefaces Datascroller 时遇到问题成分。 我有一个 jsf 页面,它应该在页面加载时显示 10 个事件。如果用户想要查看更多,他/她可以单击更多按钮加载并显示 1
我想使用我的 faces-config.xml (JSF 2.0) 的导航规则功能,但我遇到了一些问题。我有三个文件(index.xhtml、index2.html、index3.xhtml),它们看
我是一名优秀的程序员,十分优秀!