如何在不渲染页面调用与Openfaces / JSF的方法? [英] How to invoke a method with Openfaces/JSF without rendering page?

查看:175
本文介绍了如何在不渲染页面调用与Openfaces / JSF的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想与Openfaces 3.一个bean调用保存方法而Firefox不会渲染页面,IE浏览器一样。

I am trying to invoke a Save method in a bean with Openfaces 3. While Firefox is not rendering the page, Internet Explorer does.

我目前使用这种code线:

I'm currently using this code lines:

<o:commandLink value="Save" action="#{beanX.save}">
  <h:graphicImage url="/images/save_48.png" />
</o:commandLink>

但我试图 0:AJAX 以及

<o:commandLink value="Save" action="#{beanX.save}">
  <h:graphicImage url="/images/save_48.png" />
  <o:ajax event="click" render="@none" />
</o:commandLink>

任何想法?

我已经找到一种方法来处理使用标准JSF组件。任何想法如何解决这个问题 0:commandLink

I've found a way to deal with using standard JSF components. Any ideas how to solve this issue with o:commandLink?

推荐答案

感谢您Jigar乔希。你给了我钥匙提示。它的工作原理与此code线:

Thank you Jigar Joshi. You've given me the key hint. It works with this code lines:

<h:commandLink value="Save">
  <h:graphicImage url="/images/save_48.png" />
  <f:ajax event="click" render="@none" listener="#{beanX.save}" />
</h:commandLink>

我已经到这个网站之前,我并没有考虑在假设 0:commandLink 可能无法来解决这个问题,可能是一个错误

I've been to this website before, I was not thinking in assuming that o:commandLink might not be able to handle this, might be a bug?

使用 H:commandLink 而不是 0:commandLink F:AJAX 与听者属性解决我的问题。

Using h:commandLink instead of o:commandLink and f:ajax with the listener attribute solved my problem.

这篇关于如何在不渲染页面调用与Openfaces / JSF的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆