我有一个不受保护的JSF页面j_security_check.我执行以下步骤:
Firebug显示a ViewExpiredException正如预期的那样被提升.
帖子:
Run Code Online (Sandbox Code Playgroud)javax.faces.ViewState=8887124636062606698:-1513851009188353364响应:
Run Code Online (Sandbox Code Playgroud)<partial-response> <error> <error-name>class javax.faces.application.ViewExpiredException</error-name> <error-message>viewId:/viewer.xhtml - View /viewer.xhtml could not be restored.</error-message> </error> </partial-response>
但是,一旦我将页面配置为受保护j_security_check并执行上面列出的相同步骤,奇怪的是(对我而言)ViewExpiredException不再引发.相反,响应只是一种新的视图状态.
帖子:
Run Code Online (Sandbox Code Playgroud)javax.faces.ViewState=-4873187770744721574:8069938124611303615响应:
Run Code Online (Sandbox Code Playgroud)<partial-response> <changes> <update id="javax.faces.ViewState">234065619769382809:-4498953143834600826</update> </changes> </partial-response>
有人可以帮我解决这个问题吗?我希望它引发异常,以便我可以处理该异常并显示错误页面.现在它只是响应一个新的ViewState,我的页面卡住了没有任何视觉反馈.
伪代码:
开始存储过程
承诺
检查第a行//第1步的值列1
更新第a行第2行的第1列
承诺
结束存储过程
这个sp线程安全吗?
Declare
tag_rec prep_tag%ROWTYPE;
begin
COMMIT;
SELECT * INTO tag_rec
FROM PREP_TAG
WHERE project = 'a' and categoryId = 'b';
if tag_rec.locked = 'No' then
UPDATE prep_tag
SET locked = 'Yes'
WHERE TAG_NUMBER = tag_rec.TAG_NUMBER;
end if;
COMMIT;
end;
Run Code Online (Sandbox Code Playgroud)
这个sp线程安全吗?是否有可能线程A检查了tag_rec.locked ='否',那么它即将更新它.但在它之前,线程B偷偷进入并且还看到tag_rec.locked ='不'?
我正在关注这个例子:http: //mkblog.exadel.com/2008/11/richfaces-built-in-sorting/
它表示箭头应该出现在标题旁边,用户可以单击它进行排序.
但我不能让箭头出现.你帮忙谢谢.
我使用的代码:
newwonder.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>Requirement Workflow</title>
</h:head>
<h:body>
<rich:dataTable value="#{newWondersBean.sevenNewWonders}" var="wonder">
<rich:column sortBy="#{wonder.name}">
<f:facet name="header">Name</f:facet>
<h:outputText value="#{wonder.name}" />
</rich:column>
<rich:column sortBy="#{wonder.location}">
<f:facet name="header">Location</f:facet>
<h:outputText value="#{wonder.location}" />
</rich:column>
<rich:column>
<f:facet name="header">Image</f:facet>
<h:graphicImage url="#{wonder.imageUrl}" />
</rich:column>
</rich:dataTable>
</h:body>
</html>
Run Code Online (Sandbox Code Playgroud)
NewWondersBean.java
package wonder;
import java.util.ArrayList;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean
@ViewScoped
public class NewWondersBean {
private ArrayList <Wonder> sevenNewWonders = …Run Code Online (Sandbox Code Playgroud)