Jsf 未调用primefaces remoteCommand操作
我有以下代码:Jsf 未调用primefaces remoteCommand操作,jsf,primefaces,action,actionlistener,remotecommand,Jsf,Primefaces,Action,Actionlistener,Remotecommand,我有以下代码: <p:remoteCommand name="navigateTo" actionListener="#{searchControllerHelper.dummyActionListener}" action="#{searchControllerHelper.navigateTo}" update="searchPanelForm" onstart="plsWaitDlg.show()" onsuccess="plsWaitDlg.hide()"/&g
<p:remoteCommand name="navigateTo" actionListener="#{searchControllerHelper.dummyActionListener}"
action="#{searchControllerHelper.navigateTo}" update="searchPanelForm"
onstart="plsWaitDlg.show()" onsuccess="plsWaitDlg.hide()"/>
我添加了actionlistener来检查控制器是否被解雇,事实确实如此
发生的情况如下:页面加载,在加载完成之前,如果用户单击调用此remoteCommand的按钮,则会奇怪地调用actionListener,但action方法没有
我能做些什么来缓解这个问题
多谢各位
Karthik您还可以提供托管bean的代码吗?你用的是哪个PrimeFaces版本?谢谢Lars。我在上面的问题中添加了行动方法。此外,我们正在使用primefaces 3.5.8.2
public String navigateTo() throws FetchException {
if (null == this.getSelectedMenuLink()) {
return null;
}
if (this.getSelectedMenuLink().longValue() == 1L) {
this.prevSelectedMenuLink = this.selectedMenuLink;
this.location = null;
return searchCRE();
}
else if (this.getSelectedMenuLink().longValue() == 2L) {
this.prevSelectedMenuLink = this.selectedMenuLink;
this.selectedLoanType=null;
return searchLoans();
}
else if (this.getSelectedMenuLink().longValue() == 3L) {
this.prevSelectedMenuLink = this.selectedMenuLink;
this.selectedLoanType=null;
return searchLoans();
}
else if (this.getSelectedMenuLink().longValue() == 4L) {
this.prevSelectedMenuLink = this.selectedMenuLink;
return otherOpportunities();
}
else if (this.getSelectedMenuLink().longValue() == 5L) {
//The link needs to be 'activated' once a service provider is selected.
this.prevSelectedMenuLink= this.selectedMenuLink;
return this.navigateToHome();
}
return null;
}