[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Sat Dec 16 09:37:38 EST 2006
User: gavin
Date: 06/12/16 09:37:38
Modified: src/main/org/jboss/seam/core Page.java Pages.java
Log:
JBSEAM-603
Revision Changes Path
1.8 +11 -0 jboss-seam/src/main/org/jboss/seam/core/Page.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Page.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Page.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- Page.java 10 Dec 2006 14:22:28 -0000 1.7
+++ Page.java 16 Dec 2006 14:37:37 -0000 1.8
@@ -108,6 +108,7 @@
private boolean nested;
private FlushModeType flushMode;
private String pageflow;
+ private boolean conversationRequired;
Page(String viewId)
{
@@ -322,4 +323,14 @@
this.pageflow = pageflow;
}
+ public boolean isConversationRequired()
+ {
+ return conversationRequired;
+ }
+
+ protected void setConversationRequired(boolean conversationRequired)
+ {
+ this.conversationRequired = conversationRequired;
+ }
+
}
\ No newline at end of file
1.60 +12 -4 jboss-seam/src/main/org/jboss/seam/core/Pages.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Pages.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Pages.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- Pages.java 16 Dec 2006 02:58:10 -0000 1.59
+++ Pages.java 16 Dec 2006 14:37:37 -0000 1.60
@@ -131,7 +131,7 @@
Page entry = new Page(viewId);
pagesByViewId.put(viewId, entry);
- entry.setSwitchEnabled(!"disabled".equals( page.attributeValue("switch") ));
+ entry.setSwitchEnabled( !"disabled".equals( page.attributeValue("switch") ) );
String description = page.getTextTrim();
if (description!=null && description.length()>0)
@@ -145,8 +145,8 @@
entry.setTimeout(Integer.parseInt(timeoutString));
}
- String noConversationViewId = page.attributeValue("no-conversation-view-id");
- entry.setNoConversationViewId(noConversationViewId);
+ entry.setNoConversationViewId( page.attributeValue("no-conversation-view-id") );
+ entry.setConversationRequired( "true".equals( page.attributeValue("conversation-required") ) );
String action = page.attributeValue("action");
if (action!=null)
@@ -330,8 +330,16 @@
String viewId = facesContext.getViewRoot().getViewId();
for ( Page page: getPageStack(viewId) )
{
+ if ( page.isConversationRequired() && !Manager.instance().isLongRunningConversation() )
+ {
+ Manager.instance().redirectToNoConversationView();
+ return result;
+ }
+ else
+ {
result = callAction(page, facesContext) || result;
}
+ }
return result;
}
More information about the jboss-cvs-commits
mailing list