- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Primefaces 3.5 JSF 2.1
我正在使用 p:remoteCommand 执行异步命令并在页面加载后更新我的 View ,但看起来在每次迭代结束时它会再次执行等等...
这种行为正确吗?
如何只执行一次p:remoteCommand?
更新
我已经检查过我的remoteCommand不在更新面板中,所以感谢您的回答,但已经可以了。我如何解决我的问题:
我不知道为什么,但使用 Omnifaces ( http://showcase.omnifaces.org/components/onloadScript ) 中的 onloadScript 来调用它被调用多次的 RemoteCommand 函数,但使用 $(document).ready ...仅一次。所以,我改变了它,现在就可以使用了。
最佳答案
如果您最终陷入类似行为的无限循环,您可能会将父组件更新为 <p:remoteCommand>
。
<h:form id="myform">
<p:remoteCommand update="myform" actionListener="#{remoteCommandView.execute}" />
...
</h:form>
将其放在您要更新的组件的外部/旁边,一切应该没问题。
<h:form id="newform">
<p:remoteCommand update="myform" actionListener="#{remoteCommandView.execute}" />
</h:form>
<h:form id="myform">
...
</h:form>
关于jsf - Primeface的remoteCommand - 有办法执行一次吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23980848/
我遇到了一个非常有趣的问题。这是我的场景: 我的目标 使用带有嵌套工具提示的 SelectManyCheckbox。 使用 SelectManyCheckbox onHide 事件触发 Ajax (A
我遇到了以下问题: Primefaces remoteCommand 没有执行,这是否取决于我的 portlet 的生命周期? . . . var pageID;
这个有点棘手,我不明白为什么会这样: 所以我
我了解对于带有 widgetVar 的 PrimeFaces 组件属性,我可以使用 p:widgetVar('myComponentId')得到 widgetVar从组件的 ID 派生。如果 具有相
我有一个带有表格的页面,其中有用户可以隐藏和显示的可选列。当用户选择通过表格底部的链接下载表格内容时,我想向他们发送当前显示列的内容。 为了做到这一点,我需要使用远程命令,因为常规的 commandL
我想从 javascript 将值传递给 remoteCommand。如果这是可能的,我该如何做到这一点以及如何在支持 bean 中接收它们? 最佳答案 是的,这是可能的。如何执行此操作取决于 Pri
我想从 javascript 向 remoteCommand 传递值。如果可能的话,我该怎么做以及如何在支持 bean 中接收它们? 最佳答案 是的,这是可能的。如何做到这一点取决于 PrimeFac
如果有人能在这里给我帮助,我将不胜感激。 我在页面上有一个选项卡式布局,通过单击选项卡 (p:commandLink),我想为该选项卡初始化适当的数据并更新显示内容的区域。因为我希望延迟进行初始化(当
我正在尝试更新 Prime Faces PickList用RemoteCommnad当定义了 updatePermission 属性时,我得到了一个 javax.el.PropertyNotFound
我正在尝试在我的应用程序中实现 primefaces 的 RemoteCommand 标签,但不知何故它并不像文档所说的那样工作。 我想要实现的内容:我有几个具有不同布局的页面,但所有页面都使用相同的
我在向表单添加 p:remoteCommand 时遇到问题。它看起来像: Reset Test
给定以下 XHTML 代码,其中包含一个 和一个 只有两列。
在下面的示例中,我使用 p:ajax 修改数据表,然后使用 remoteCommand 更新该表。这样可行。但是,我也想在出现错误或成功时更新 growl 消息。那行不通。 我从示例中看到,如果一个按
我有一个包含 p:commandLink 的 p:dataTable。我需要在鼠标悬停事件上使用参数进行 ajax 调用。我发现 commandLink 无法通过鼠标悬停事件进行 ajax 调用。我们
我在这里使用这个远程命令 https://github.com/kubernetes/client-go/blob/master/tools/remotecommand/remotecommand.g
我尝试使用从自动完成组件中的选定页面对象获得的链接在新窗口(或选项卡)中呈现新页面。在尝试了多个选项之后,我认为唯一的机会是使用 javascript 来捕获提交,触发远程命令,这会给我一个带有页面对
我在 JSF 应用程序中使用 p:remoteCommand。我有 7 个不同的 p:remoteCommand 声明来调用 bean 中的不同操作。点击按钮,这7个远程命令同时被调用。调用了 JS
我正在尝试编写一个自定义步骤,它将运行几个命令,并根据某些条件返回 pas 或失败。 到目前为止,我能够对 ShellCommand 进行子类化;这样我就可以在从机上执行 shell 命令。现在,下一
我正在使用 p:remoteCommand,它在 update 和 process 方面工作正常,除了它没有调用任何一个 action 方法或 actionListener Xhtml代码
从 2.2.1 升级后,我无法再在对话框组件内显示 View 范围支持 bean 中的一些数据。弹出对话框,但来自 bean 的数据设置为 null。 问题似乎是按钮的远程命令调用了 javascri
我是一名优秀的程序员,十分优秀!