如果我的地方,例如,下面的组件,点击它,它表现为预期的:
If I place, for instance, the following component and click it, it behaves as expected:
<h:commandLink value="Click me" action="anotherPage.jsf" />
但是,如果我使用Ajax:
But if I use Ajax:
<h:commandLink value="Click me" action="anotherPage.jsf"><f:ajax /></h:commandLink>
它不会导航到其他页面。 我失去了一些东西?这难道不应该工作?
It doesn't navigate to the other page. Am I missing something? Isn't this supposed to work?
另一个问题是,当我点击即会话超时后用ajax一个按钮,应用程序重定向到登录页面,但它不会加载CSS文件。
Another issue is that, when I click a button that is using ajax after session timeout, the application redirects to the login page but it doesn't load css files.
任何想法?
亲切的问候,
卡洛斯·费雷拉
您的可以的做,如果你发送重定向消息。
You can do it if you send a redirect.
action="anotherPage.jsf?faces-redirect=true"
不过,我完全看不出使用Ajax这样的导航点/效益。
However, I completely fail to see the point/benefit of navigating using Ajax like that.
上一篇:我怎样才能在jQuery的停止$。员额以异步方式运行?员额、方式、jQuery
下一篇:如何修复浏览器缓存和notmodified响应的JSON? jQuery.ajax({ifModified:真,缓存:真})上的数据响应JSON请求突破缓存、浏览器、数据、ifModified