Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 未调用primefaces remoteCommand操作_Jsf_Primefaces_Action_Actionlistener_Remotecommand - Fatal编程技术网

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;
}