Author: pete.muir(a)jboss.org
Date: 2008-05-21 11:31:38 -0400 (Wed, 21 May 2008)
New Revision: 8256
Modified:
trunk/src/main/org/jboss/seam/navigation/Page.java
trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-2352
Modified: trunk/src/main/org/jboss/seam/navigation/Page.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Page.java 2008-05-21 14:03:58 UTC (rev 8255)
+++ trunk/src/main/org/jboss/seam/navigation/Page.java 2008-05-21 15:31:38 UTC (rev 8256)
@@ -14,6 +14,7 @@
import org.jboss.seam.core.Events;
import org.jboss.seam.core.Interpolator;
import org.jboss.seam.core.ResourceLoader;
+import org.jboss.seam.core.Expressions.ValueExpression;
import org.jboss.seam.security.Identity;
import org.jboss.seam.web.Pattern;
@@ -28,7 +29,7 @@
private final String viewId;
private String description;
private Integer timeout;
- private String noConversationViewId;
+ private ValueExpression<String> noConversationViewId;
private String resourceBundleName;
private boolean switchEnabled = true;
private List<Param> parameters = new ArrayList<Param>();
@@ -129,12 +130,12 @@
return timeout;
}
- public void setNoConversationViewId(String noConversationViewId)
+ public void setNoConversationViewId(ValueExpression<String>
noConversationViewId)
{
this.noConversationViewId = noConversationViewId;
}
- public String getNoConversationViewId()
+ public ValueExpression<String> getNoConversationViewId()
{
return noConversationViewId;
}
Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-05-21 14:03:58 UTC (rev
8255)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-05-21 15:31:38 UTC (rev
8256)
@@ -48,6 +48,7 @@
import org.jboss.seam.core.Expressions.ValueExpression;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.faces.Validation;
+import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.pageflow.Pageflow;
@@ -72,7 +73,7 @@
{
private static final LogProvider log = Logging.getLogProvider(Pages.class);
- private String noConversationViewId;
+ private ValueExpression<String> noConversationViewId;
private String loginViewId;
private Integer httpPort;
@@ -573,7 +574,7 @@
Events.instance().raiseEvent("org.jboss.seam.noConversation");
FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ StatusMessage.Severity.WARN,
"org.jboss.seam.NoConversation",
"The conversation ended, timed out or was processing another
request"
);
@@ -880,13 +881,13 @@
for (int i=stack.size()-1; i>=0; i--)
{
Page page = stack.get(i);
- String noConversationViewId = page.getNoConversationViewId();
+ String noConversationViewId = page.getNoConversationViewId().getValue();
if (noConversationViewId!=null)
{
return noConversationViewId;
}
}
- return this.noConversationViewId;
+ return this.noConversationViewId.getValue();
}
/**
@@ -924,7 +925,7 @@
Element root = getDocumentRoot(stream);
if (noConversationViewId==null) //let the setting in components.xml override the
pages.xml
{
- noConversationViewId =
root.attributeValue("no-conversation-view-id");
+ noConversationViewId =
Expressions.instance().createValueExpression(root.attributeValue("no-conversation-view-id"),
String.class);
}
if (loginViewId==null) //let the setting in components.xml override the pages.xml
{
@@ -1060,7 +1061,7 @@
page.setTimeout(Integer.parseInt(timeoutString));
}
-
page.setNoConversationViewId(element.attributeValue("no-conversation-view-id"));
+
page.setNoConversationViewId(Expressions.instance().createValueExpression(element.attributeValue("no-conversation-view-id"),
String.class));
page.setConversationRequired("true".equals(element.attributeValue("conversation-required")));
page.setLoginRequired("true".equals(element.attributeValue("login-required")));
page.setScheme(element.attributeValue("scheme"));
@@ -1479,12 +1480,12 @@
*
* @return a JSF view id
*/
- public String getNoConversationViewId()
+ public ValueExpression<String> getNoConversationViewId()
{
return noConversationViewId;
}
- public void setNoConversationViewId(String noConversationViewId)
+ public void setNoConversationViewId(ValueExpression<String>
noConversationViewId)
{
this.noConversationViewId = noConversationViewId;
}
Show replies by date