Primefaces:是否有任何 get p:effect 对 Glassfish 起作用
这是我的代码。当我单击链接 Comment
时,应该会出现 inputTextarea
和 commandButton
<h:outputLink id="link" value="javascript:void(0)">
<h:outputText value="Comment"/>
<p:effect type="fade" event="click" for="reply">
<f:param name="mode" value="'show'"/>
</p:effect>
</h:outputLink>
<h:panelGrid id="reply" style="display:none;">
<h:inputTextarea id="keyword" rows="2" />
</h:panelGrid>
</h:outputLink>
当我单击链接时,似乎什么也没有发生,什么也没有出现。任何想法。我在 Glassfish 上运行这个。 primeface.org 的展示在 Tomcat 下运行。
Here is my code. When I click the link Comment
, a inputTextarea
and commandButton
suppose to appear
<h:outputLink id="link" value="javascript:void(0)">
<h:outputText value="Comment"/>
<p:effect type="fade" event="click" for="reply">
<f:param name="mode" value="'show'"/>
</p:effect>
</h:outputLink>
<h:panelGrid id="reply" style="display:none;">
<h:inputTextarea id="keyword" rows="2" />
</h:panelGrid>
</h:outputLink>
When I click on the link, nothing seem to happen, nothing appear. Any idea. I run this on Glassfish. The showcase from primeface.org is running under Tomcat.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有两个问题:
首先,根据 PrimeFaces 用户指南,
出现< /code> 效果不受支持。
因此将
p:effect
更改为:其次,生成的链接源告诉以下内容:
客户端 ID
j_idt6:j_idt7
没有出现在源代码中的任何地方。它必须是链接本身。因此,将id
添加到h:outputLink
应该可以修复它。看起来像是 PrimeFaces 中的一个错误。There are two problems:
First, according to the PrimeFaces User Guide the
appear
effect is not supported.So change the
p:effect
to:Second, the generated source of the link tells the following:
The client ID
j_idt6:j_idt7
doesn't appear anywhere in the source. It has to be the link itself. So adding anid
to theh:outputLink
should fix it. Look like a bug in PrimeFaces.