Primefaces ajax not working
Primefaces ajax not working
我有一个奇怪的问题。我正在Jboss 7上使用JSF、SEAM和Primefaces开发一个应用程序。最近我遇到了一个奇怪的问题。在我的模板中,我有两个控件:1.类别2.通道
当用户单击所需类别时,将更新包含频道的块。如果用户点击频道,他会转到mysite.www/channel/idofchannel。在第一页上,一切都很好。但是,当用户被转移到mysite.www/channel/idofchannel时,控件不起作用。当我点击类别时,会执行commandLink的操作,但不会用通道更新块。它与f:viewParam有任何关系吗?
感谢
如果没有您的源代码,我只能猜测。如果您使用的是p:commandLink
,那么原因可能是它在默认情况下提交了一个ajax请求。然后,您必须使用update
属性来指定将由此ajax调用更新的组件。
以下是Primefaces展示的一个例子:
<p:commandLink id="ajax" update="panel,display"
actionListener="#{pprBean.savePerson}">
<h:outputText value="Ajax Submit" />
</p:commandLink>
另一种选择是设置ajax=false
并提交完整请求:
<p:commandLink id="nonAjax" actionListener="#{pprBean.savePerson}" style="margin-right:20px;" ajax="false">
<h:outputText value="Non-Ajax Submit" />
</p:commandLink>
相关文章:
- $rootScope not working
- jQuery document.ready not working
- Javascript getElementsByTagName not working?
- JQuery.val( ) not working
- Tomcat websocket is not working
- Javascript JSON.parse not working
- NodeJS Multer is not working
- Regex not working
- Ember run.debounce not working
- AngularJs 1 not working
- document.getElementById.style.backgroundImage not working
- Rxjs5, distinct() is not working
- createOscillator noteOn not working
- Javascript - .getHours() not working
- Javascript setTimeout not working | onkeydown
- MongoDB $pull not working
- Express router.use not working
- JSONP not working
- window.opener not working in chrome & IE
- Backbone + RequireJS: Collection.each() is not working