小编use*_*436的帖子

Spring JPA选择特定列

我正在使用Spring JPA来执行所有数据库操作.但是我不知道如何从Spring JPA中的表中选择特定的列?

例如:
SELECT projectId, projectName FROM projects

java jpa spring-data-jpa

119
推荐指数
9
解决办法
21万
查看次数

Primefaces p:remotecommand在IE 8中不起作用

我在我的JSF应用程序中使用p:remoteCommand.我有7个不同的p:remoteCommand声明在bean中调用不同的动作.在单击按钮时,将同时调用这7个远程命令.调用JS函数,但是某些时候对服务器的请求没有被执行,这只发生在IE上.我只在IE 8上测试过.

我试图检查在AJAX中返回的错误是什么,但我得到的是xhr = error,status = Unknown,error = undefined.

我的函数和p:remoteCommand如下:

function loadResult() {
    loadSmry();
    load1();
    load2();
    load3();
    load4();
    load5();
    load6();
}

<p:remoteCommand id="loadId" 
                 name="loadSmry"  
                 async="true"
                 action="#{designBean.saveSmry}"
                 process="@this"
                 onsuccess="summaryCount=0;"
                 onerror="handleXhrError(xhr, status, error)"
                 update="logId"/>   

<p:remoteCommand id="loadId1" 
                 name="load1"  
                 async="true"
                 action="#{designBean.showChrt1}"
                 onstart="showAjaxLoader('begin',1)" 
                 oncomplete="showAjaxLoader('success',1)"
                 onerror="handleXhrError(xhr, status, error)"
                 process="@this"                     
                 update="chart1" />

<p:remoteCommand id="loadId2" 
                 name="load2"  
                 async="true"
                 action="#{designBean.showChrt2}"
                 onstart="showAjaxLoaderForSummary('begin',2)" 
                 oncomplete="showAjaxLoader('success',2)"
                 onerror="handleXhrError(xhr, status, error)"
                 process="@this"                     
                 update="chart2" />


<p:remoteCommand id="loadId3" 
                 name="load3"  
                 async="true"
                 action="#{designBean.showChrt3}"
                 onstart="showAjaxLoader('begin',3)" 
                 oncomplete="showAjaxLoader('success',3)"
                 onerror="handleXhrError(xhr, status, error)"
                 process="@this"                     
                 update="chart3" />


<p:remoteCommand id="loadId4" 
                 name="load4"  
                 async="true"
                 action="#{designBean.showChrt4}"
                 onstart="showAjaxLoader('begin',4)" 
                 oncomplete="showAjaxLoader('success',4)"
                 onerror="handleXhrError(xhr, status, …
Run Code Online (Sandbox Code Playgroud)

primefaces jsf-2

5
推荐指数
1
解决办法
1964
查看次数

标签 统计

java ×1

jpa ×1

jsf-2 ×1

primefaces ×1

spring-data-jpa ×1