为什么A4J中ignoreDupResponse默认不设置为true
在我看来,大多数时候您希望在 a4j:support、a4j:commandLink、a4j:commandButton 等组件上将ignoreDupResponse 设置为 true。在什么情况下将ignoreDupResponse 设置为 false 会很有用?将ignoreDupResponse 设置为true 是否会产生性能成本?如果不是,为什么 A4J 不默认将ignoreDupResponse设置为true?
It seems to me that the most of the time you'd want to have ignoreDupResponse set to true on your a4j:support, a4j:commandLink, a4j:commandButton, etc. components. In which scenario it can be useful to have ignoreDupResponse set to false? Is there any performance cost of having ignoreDupResponse set to true? If not, why isn't ignoreDupResponse set to true by default by A4J?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想不出一个应该将其设置为 false 的有用示例。
但是,默认情况下将其设置为 false 的原因是这是默认/正常行为。因此,当它为假时,不会发生任何事情,而当它为真时,需要“过滤”重复的响应。
顺便说一句:这是客户端行为,因此不会对您的网络或服务器负载产生任何影响。
I cannot think of a useful example where it should be set tot false.
However, the reason why it is set to false by default is that this is the default/normal behavior. So when it is false, nothing has to happen, while when it is true, the duplicate responses need to be 'filtered'.
By the way: it is client side behavior, so it will not have any effect on your network or server load.
当相似的请求(相同的组件或来自同一组)排队时,设置ignoreDupResponse = true将在请求完成后删除DOM更新。这并不总是理想的行为。希望这有帮助。
Setting ignoreDupResponse=true will drop the DOM update after a request completes when a similar request (same component or from the same group) is queued. That's not always the desired behavior. Hope this helps.