Seam SVN: r10271 - in trunk/seam-gen/view: stylesheet and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-02 01:27:41 -0400 (Thu, 02 Apr 2009)
New Revision: 10271
Modified:
trunk/seam-gen/view/layout/menu.xhtml.ftl
trunk/seam-gen/view/stylesheet/theme.css
Log:
use drop down menu to group entity list pages in main menu bar
Modified: trunk/seam-gen/view/layout/menu.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/layout/menu.xhtml.ftl 2009-04-02 00:15:41 UTC (rev 10270)
+++ trunk/seam-gen/view/layout/menu.xhtml.ftl 2009-04-02 05:27:41 UTC (rev 10271)
@@ -9,12 +9,17 @@
<h:outputText value="${'#'}{projectName}:"/>
<s:link view="/home.xhtml" value="Home" propagation="none"/>
</rich:toolBarGroup>
+ <rich:dropDownMenu showDelay="250" hideDelay="0" submitMode="none">
+ <f:facet name="label">Browse data</f:facet>
<#foreach entity in c2j.getPOJOIterator(cfg.classMappings)>
- <s:link view="/${entity.shortName}List.xhtml"
- value="${entity.shortName} List"
-includePageParams="false"
- propagation="none"/>
+ <rich:menuItem>
+ <s:link view="/${entity.shortName}List.xhtml"
+ value="${entity.shortName} List"
+ includePageParams="false"
+ propagation="none"/>
+ </rich:menuItem>
</#foreach>
+ </rich:dropDownMenu>
<!-- @newMenuItem@ -->
<rich:toolBarGroup location="right">
<h:outputText value="signed in as: ${'#'}{credentials.username}" rendered="${'#'}{identity.loggedIn}"/>
Modified: trunk/seam-gen/view/stylesheet/theme.css
===================================================================
--- trunk/seam-gen/view/stylesheet/theme.css 2009-04-02 00:15:41 UTC (rev 10270)
+++ trunk/seam-gen/view/stylesheet/theme.css 2009-04-02 05:27:41 UTC (rev 10271)
@@ -165,6 +165,10 @@
vertical-align: bottom;
}
+.rich-toolbar-item a {
+ text-decoration: none;
+}
+
.rich-datalist {
list-style: square;
margin: 6px 0 1px 0;
16 years, 8 months
Seam SVN: r10270 - trunk/src/wicket/org/jboss/seam/wicket.
by seam-commits@lists.jboss.org
Author: cpopetz
Date: 2009-04-01 20:15:41 -0400 (Wed, 01 Apr 2009)
New Revision: 10270
Modified:
trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java
Log:
JBSEAM-4062
Modified: trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java 2009-04-01 23:56:49 UTC (rev 10269)
+++ trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java 2009-04-02 00:15:41 UTC (rev 10270)
@@ -179,9 +179,20 @@
String cid = (String) page.getMetaData(CID);
if (cid != null)
{
- ConversationPropagation cp = ConversationPropagation.instance();
- cp.setConversationId(cid);
- Manager.instance().restoreConversation();
+ Manager manager = Manager.instance();
+ if (manager.isLongRunningConversation())
+ {
+ if (!cid.equals(manager.getCurrentConversationId()))
+ {
+ manager.switchConversation(cid);
+ }
+ }
+ else
+ {
+ ConversationPropagation cp = ConversationPropagation.instance();
+ cp.setConversationId(cid);
+ manager.restoreConversation();
+ }
}
}
}
16 years, 8 months
Seam SVN: r10269 - trunk/examples/itext.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-04-01 19:56:49 -0400 (Wed, 01 Apr 2009)
New Revision: 10269
Removed:
trunk/examples/itext/extra/
Log:
remove dead files
16 years, 8 months
Seam SVN: r10268 - trunk/examples/booking/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-04-01 17:26:06 -0400 (Wed, 01 Apr 2009)
New Revision: 10268
Modified:
trunk/examples/booking/resources/WEB-INF/pages.xml
Log:
JBSEAM-4061
Modified: trunk/examples/booking/resources/WEB-INF/pages.xml
===================================================================
--- trunk/examples/booking/resources/WEB-INF/pages.xml 2009-04-01 18:05:44 UTC (rev 10267)
+++ trunk/examples/booking/resources/WEB-INF/pages.xml 2009-04-01 21:26:06 UTC (rev 10268)
@@ -39,7 +39,7 @@
login-required="true">
<navigation>
- <rule if="#{changePassword.changed}">
+ <rule if="#{identity.loggedIn and changePassword.changed}">
<redirect view-id="/main.xhtml"/>
</rule>
</navigation>
@@ -59,9 +59,9 @@
</page>
- <page view-id="/hotel.xhtml"
- conversation-required="true"
- login-required="true">
+ <page view-id="/hotel.xhtml"
+ conversation-required="true"
+ login-required="true">
<description>View hotel: #{hotel.name}</description>
@@ -71,9 +71,9 @@
</page>
- <page view-id="/book.xhtml"
- conversation-required="true"
- login-required="true">
+ <page view-id="/book.xhtml"
+ conversation-required="true"
+ login-required="true">
<description>Book hotel: #{hotel.name}</description>
@@ -85,9 +85,9 @@
</page>
- <page view-id="/confirm.xhtml"
- conversation-required="true"
- login-required="true">
+ <page view-id="/confirm.xhtml"
+ conversation-required="true"
+ login-required="true">
<description>Confirm booking: #{booking.description}</description>
@@ -97,8 +97,7 @@
</page>
- <page view-id="*">
-
+ <page view-id="*">
<navigation from-action="#{identity.logout}">
<redirect view-id="/home.xhtml"/>
</navigation>
16 years, 8 months
Seam SVN: r10267 - trunk/ui/src/main/java/org/jboss/seam/ui.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-04-01 14:05:44 -0400 (Wed, 01 Apr 2009)
New Revision: 10267
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/DocumentStoreUtils.java
Log:
JBSEAM-4046
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/DocumentStoreUtils.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/DocumentStoreUtils.java 2009-04-01 11:48:55 UTC (rev 10266)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/DocumentStoreUtils.java 2009-04-01 18:05:44 UTC (rev 10267)
@@ -5,6 +5,10 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.channels.WritableByteChannel;
import javax.faces.context.FacesContext;
@@ -17,64 +21,85 @@
public class DocumentStoreUtils
{
+ private static final int BUFFER_SIZE = 32768;
- public static String addResourceToDataStore(FacesContext ctx, UIResource resource)
- {
- String baseName = Pages.getCurrentBaseName();
- String viewId = Pages.getViewId(ctx);
+ public static String addResourceToDataStore(FacesContext ctx, UIResource resource) {
+ String baseName = Pages.getCurrentBaseName();
+ String viewId = Pages.getViewId(ctx);
- DocumentStore store = DocumentStore.instance();
- String id = store.newId();
+ DocumentStore store = DocumentStore.instance();
+ String id = store.newId();
- DocumentType type = new DocumentType("", resource.getContentType());
+ DocumentType type = new DocumentType("", resource.getContentType());
- DocumentData documentData = new DownloadableDocumentData(baseName, type, resource.getData());
- documentData.setFilename(resource.getFileName());
- documentData.setDisposition(resource.getDisposition());
+ DocumentData documentData = new DownloadableDocumentData(baseName, type, resource.getData());
+ documentData.setFilename(resource.getFileName());
+ documentData.setDisposition(resource.getDisposition());
- String url = store.preferredUrlForContent(resource.getFileName(), type.getExtension(), id);
- url = Manager.instance().encodeConversationId(url, viewId);
- store.saveData(id, documentData);
- return url;
- }
+ String url = store.preferredUrlForContent(resource.getFileName(), type.getExtension(), id);
+ url = Manager.instance().encodeConversationId(url, viewId);
+ store.saveData(id, documentData);
+ return url;
+ }
- static class DownloadableDocumentData extends DocumentData
- {
+ static class DownloadableDocumentData
+ extends DocumentData
+ {
+ private Object data;
- private Object data;
+ public DownloadableDocumentData(String baseName, DocumentType type, Object data) {
+ super(baseName, type);
+ this.data = data;
+ }
- public DownloadableDocumentData(String baseName, DocumentType type, Object data)
- {
- super(baseName, type);
- this.data = data;
- }
+ @Override
+ public void writeDataToStream(OutputStream os)
+ throws IOException
+ {
+ if (data instanceof byte[]) {
+ os.write((byte[]) data);
+ } else if (data instanceof File) {
+ writeStream(os, new FileInputStream((File) data));
+ } else if (data instanceof InputStream) {
+ writeStream(os, (InputStream) data);
+ }
+ }
- @Override
- public void writeDataToStream(OutputStream os) throws IOException
- {
- if (data instanceof byte[])
- {
- os.write((byte[]) data);
- }
- else if (data instanceof File)
- {
- writeStream(os, new FileInputStream((File) data));
- }
- else if (data instanceof InputStream)
- {
- writeStream(os, (InputStream) data);
- }
+ private void writeStream(OutputStream os, InputStream is)
+ throws IOException
+
+ {
+ ReadableByteChannel in = Channels.newChannel(is);
+ WritableByteChannel out = Channels.newChannel(os);
+
+ try {
+ copyChannel(in, out);
+ } finally {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // eat it
+ }
+
+ try {
+ out.close();
+ } catch (IOException e) {
+ // eat it
+ }
+ }
+ }
+
+ private void copyChannel(ReadableByteChannel in, WritableByteChannel out)
+ throws IOException
+ {
+ ByteBuffer buffer = ByteBuffer.allocateDirect(BUFFER_SIZE);
+
+ while (in.read(buffer) != -1 || buffer.position() > 0) {
+ buffer.flip();
+ out.write(buffer);
+ buffer.compact();
+ }
+ }
+ }
- }
-
- private void writeStream(OutputStream os, InputStream is) throws IOException
- {
- while (is.available() > 0)
- {
- os.write(is.read());
- }
- }
-
- }
-
}
16 years, 8 months
Seam SVN: r10266 - in trunk: ui/src/main/java/org/jboss/seam/ui/facelet and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-04-01 07:48:55 -0400 (Wed, 01 Apr 2009)
New Revision: 10266
Modified:
trunk/src/main/org/jboss/seam/contexts/ServletLifecycle.java
trunk/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java
Log:
JBSEAM-3555
Modified: trunk/src/main/org/jboss/seam/contexts/ServletLifecycle.java
===================================================================
--- trunk/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2009-04-01 07:34:13 UTC (rev 10265)
+++ trunk/src/main/org/jboss/seam/contexts/ServletLifecycle.java 2009-04-01 11:48:55 UTC (rev 10266)
@@ -6,6 +6,7 @@
*/
package org.jboss.seam.contexts;
+import java.lang.ref.WeakReference;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -23,7 +24,7 @@
/**
* Methods for setup and teardown of Seam contexts at the
* beginning and end of servlet requests.
- *
+ *
* @author Gavin King
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
*/
@@ -40,7 +41,7 @@
return servletContext;
}
- public static void beginRequest(HttpServletRequest request)
+ public static void beginRequest(HttpServletRequest request)
{
log.debug( ">>> Begin web request" );
Contexts.eventContext.set( new EventContext( new ServletRequestMap(request) ) );
@@ -112,7 +113,7 @@
Contexts.startup(ScopeType.APPLICATION);
Events.instance().raiseEvent("org.jboss.seam.postInitialization");
-
+
// Clean up contexts used during initialization
Contexts.destroy( Contexts.getConversationContext() );
Contexts.conversationContext.set(null);
@@ -120,12 +121,17 @@
Contexts.eventContext.set(null);
Contexts.sessionContext.set(null);
Contexts.applicationContext.set(null);
-
+
log.debug("<<< End initialization");
}
- public static void beginApplication(ServletContext context)
+ public static void beginApplication(ServletContext context)
{
+ // caching the classloader to servletContext
+ WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(Thread.currentThread().getContextClassLoader());
+ context.setAttribute("seam.context.classLoader",ref);
+ log.info("Cached the context classloader in servletContext as 'seam.context.classLoader'");
+
servletContext = context;
Lifecycle.beginApplication( new ServletApplicationMap(context) );
}
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java 2009-04-01 07:34:13 UTC (rev 10265)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java 2009-04-01 11:48:55 UTC (rev 10266)
@@ -2,12 +2,16 @@
import java.io.IOException;
import java.io.StringWriter;
+import java.lang.ref.WeakReference;
import java.net.URL;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
import org.jboss.seam.core.ResourceLoader;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
import org.jboss.seam.jsf.DelegatingFacesContext;
import org.jboss.seam.mock.MockHttpServletRequest;
import org.jboss.seam.mock.MockHttpServletResponse;
@@ -19,61 +23,78 @@
public class RendererRequest
{
-
+ private static final LogProvider log = Logging.getLogProvider(RendererRequest.class);
+
private FacesContext originalFacesContext;
private FacesContext facesContext;
-
+
private MockHttpServletRequest request;
private MockHttpServletResponse response;
-
+
private StringWriter writer;
-
+
private String viewId;
-
+
+ private ClassLoader originalClassLoader;
+
public RendererRequest(String viewId)
{
this.viewId = viewId;
}
-
+
private void init()
{
request = new MockHttpServletRequest(HttpSessionManager.instance());
response = new MockHttpServletResponse();
-
+
// Generate the FacesContext from the JSF FacesContextFactory
originalFacesContext = FacesContext.getCurrentInstance();
facesContext = RendererFacesContextFactory.instance().getFacesContext(request, response);
DelegatingFacesContext.setCurrentInstance(facesContext);
-
+
// Create the viewRoot
UIViewRoot newRoot = facesContext.getApplication().getViewHandler().createView(facesContext, viewId);
facesContext.setViewRoot(newRoot);
-
+
// Set the responseWriter to write to a buffer
writer = new StringWriter();
facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer,
null, null));
+
+ // Set the context classloader to the cached one
+ originalClassLoader = Thread.currentThread().getContextClassLoader();
+ ServletContext ctx = request.getSession().getServletContext();
+ WeakReference<ClassLoader> ref = (WeakReference<ClassLoader>)ctx.getAttribute("seam.context.classLoader");
+ if (ref == null || ref.get() == null) {
+ log.warn("Failed to bootstrap context classloader. Facelets may not work properly from MDBs");
+ } else {
+ Thread.currentThread().setContextClassLoader(ref.get());
+ }
}
-
+
private void cleanup()
{
+ if (originalClassLoader != null) {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ originalClassLoader = null;
+ }
+
facesContext.release();
DelegatingFacesContext.setCurrentInstance(originalFacesContext);
-
-
+
originalFacesContext = null;
facesContext = null;
request = null;
response = null;
}
-
+
public void run() throws IOException
{
init();
renderFacelet(facesContext, faceletForViewId(viewId));
cleanup();
}
-
+
public String getOutput()
{
return writer.getBuffer().toString();
16 years, 8 months
Seam SVN: r10265 - trunk/seam-gen/build-scripts.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-01 03:34:13 -0400 (Wed, 01 Apr 2009)
New Revision: 10265
Modified:
trunk/seam-gen/build-scripts/glassfish-build.xml
Log:
add gf-restart command (just calls gf-explode)
Modified: trunk/seam-gen/build-scripts/glassfish-build.xml
===================================================================
--- trunk/seam-gen/build-scripts/glassfish-build.xml 2009-04-01 07:33:50 UTC (rev 10264)
+++ trunk/seam-gen/build-scripts/glassfish-build.xml 2009-04-01 07:34:13 UTC (rev 10265)
@@ -111,6 +111,8 @@
<asadmin cmd="deploy" args="--name ${project.name} ${exploded.archive.dir}"/>
</target>
+ <target name="gf-restart" depends="gf-explode"/>
+
<target name="gf-reexplode" depends="clean,gf-undeploy,gf-explode"
description="Clean, undeploy, and deploy the datasource and exploded archive to GlassFish"/>
16 years, 8 months
Seam SVN: r10264 - trunk/seam-gen/view/layout.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-01 03:33:50 -0400 (Wed, 01 Apr 2009)
New Revision: 10264
Modified:
trunk/seam-gen/view/layout/template.xhtml
Log:
pretty things up; add useful debug footer
Modified: trunk/seam-gen/view/layout/template.xhtml
===================================================================
--- trunk/seam-gen/view/layout/template.xhtml 2009-04-01 07:19:23 UTC (rev 10263)
+++ trunk/seam-gen/view/layout/template.xhtml 2009-04-01 07:33:50 UTC (rev 10264)
@@ -1,40 +1,46 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<f:view contentType="text/html"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a="http://richfaces.org/a4j"
- xmlns:s="http://jboss.com/products/seam/taglib">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<f:view xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ contentType="text/html">
<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>@projectName@</title>
- <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/>
- <a:loadStyle src="resource:///stylesheet/theme.xcss"/>
- <a:loadStyle src="/stylesheet/theme.css"/>
- <ui:insert name="head"/>
-</head>
-
-<body>
-
- <ui:include src="menu.xhtml">
- <ui:param name="projectName" value="@projectName@"/>
- </ui:include>
-
- <div class="body">
- <h:messages id="messages" globalOnly="true" styleClass="message"
- errorClass="errormsg" infoClass="infomsg" warnClass="warnmsg"
- rendered="#{showGlobalMessages != 'false'}"/>
- <ui:insert name="body"/>
- </div>
-
- <div class="footer">
- Powered by <a href="http://jboss.com/products/seam">Seam</a>.
- Generated by seam-gen.
- </div>
-
-</body>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>@projectName@</title>
+ <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/>
+ <a:loadStyle src="resource:///stylesheet/theme.xcss"/>
+ <a:loadStyle src="/stylesheet/theme.css"/>
+ <ui:insert name="head"/>
+ </head>
+ <body>
+ <ui:include src="menu.xhtml">
+ <ui:param name="projectName" value="@projectName@"/>
+ </ui:include>
+ <div class="body">
+ <h:messages id="messages" globalOnly="true" styleClass="message"
+ errorClass="errormsg" infoClass="infomsg" warnClass="warnmsg"
+ rendered="#{showGlobalMessages != 'false'}"/>
+ <ui:insert name="body"/>
+ </div>
+ <div class="footer">
+ <p>Powered by <a href="http://jboss.com/products/seam">Seam</a> #{org.jboss.seam.version}. Generated by seam-gen.</p>
+ <s:fragment rendered="#{init.debug}">
+ <a:log hotkey="D"/>
+ <p style="margin-top: -0.5em;">
+ Conversation: id = #{conversation.id}, #{conversation.longRunning ? 'long running' : 'temporary'}#{conversation.nested ? ', nested, parent id = '.concat(conversation.parentId) : ''}
+ #{' - '}
+ Ajax4jsf Log (Ctrl+Shift+D)
+ #{' - '}
+ <s:link id="debugConsole" view="/debug.xhtml" value="Debug console" target="debugConsole"/>
+ #{' - '}
+ <s:link id="resetSession" view="/home.xhtml" action="#{org.jboss.seam.web.session.invalidate}" propagation="none" value="Terminate session"/>
+ </p>
+ </s:fragment>
+ </div>
+ </body>
</html>
</f:view>
16 years, 8 months
Seam SVN: r10263 - trunk/src/main/org/jboss/seam/faces.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-01 03:19:23 -0400 (Wed, 01 Apr 2009)
New Revision: 10263
Modified:
trunk/src/main/org/jboss/seam/faces/Redirect.java
Log:
JBSEAM-4066
Modified: trunk/src/main/org/jboss/seam/faces/Redirect.java
===================================================================
--- trunk/src/main/org/jboss/seam/faces/Redirect.java 2009-04-01 07:03:21 UTC (rev 10262)
+++ trunk/src/main/org/jboss/seam/faces/Redirect.java 2009-04-01 07:19:23 UTC (rev 10263)
@@ -94,10 +94,11 @@
}
/**
- * Capture the view id and page parameters from the
- * current request and squirrel them away so we can
- * return here later in the conversation. If no
- * conversation is active, begin a conversation.
+ * Capture the view id, request parameters and page parameters (which take
+ * precedence) from the current request and squirrel them away so we can
+ * return here later in the conversation. If no conversation is active,
+ * begin a conversation. The conversation is terminated by {@link
+ * Redirect#returnToCapturedView()} if begun by this method.
*
* @see Redirect#returnToCapturedView()
*/
@@ -108,12 +109,16 @@
// If this isn't a faces request then just return
if (context == null) return;
- parameters = Pages.instance().getStringValuesFromPageContext(context);
+ // first capture all request parameters
+ parameters.putAll( context.getExternalContext().getRequestParameterMap() );
+ // then preserve page parameters, overwriting request parameters with same names
+ parameters.putAll( Pages.instance().getStringValuesFromPageContext(context) );
- if (context.getExternalContext().getRequestParameterMap().containsKey("actionMethod"))
- {
- parameters.put("actionMethod", context.getExternalContext().getRequestParameterMap().get("actionMethod"));
- }
+ // special case only needed for actionMethod if decide not to capture all request parameters
+ //if (context.getExternalContext().getRequestParameterMap().containsKey("actionMethod"))
+ //{
+ // parameters.put("actionMethod", context.getExternalContext().getRequestParameterMap().get("actionMethod"));
+ //}
viewId = Pages.getViewId(context);
conversationBegun = Conversation.instance().begin(true, false);
16 years, 8 months
Seam SVN: r10262 - in trunk/src/main/org/jboss/seam: servlet and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-01 03:03:21 -0400 (Wed, 01 Apr 2009)
New Revision: 10262
Modified:
trunk/src/main/org/jboss/seam/Seam.java
trunk/src/main/org/jboss/seam/servlet/SeamListener.java
Log:
put Seam version in designated application-scoped variable
Modified: trunk/src/main/org/jboss/seam/Seam.java
===================================================================
--- trunk/src/main/org/jboss/seam/Seam.java 2009-04-01 00:37:47 UTC (rev 10261)
+++ trunk/src/main/org/jboss/seam/Seam.java 2009-04-01 07:03:21 UTC (rev 10262)
@@ -41,6 +41,9 @@
private static final Map<Class, EjbDescriptor> EJB_DESCRIPTOR_CACHE = new ConcurrentHashMap<Class, EjbDescriptor>();
private static final Set<ClassLoader> CLASSLOADERS_LOADED = new HashSet<ClassLoader>();
+ // application-scoped property in which the Seam version is stored
+ public static final String VERSION = "org.jboss.seam.version";
+
public static EjbDescriptor getEjbDescriptor(Class clazz)
{
EjbDescriptor info = EJB_DESCRIPTOR_CACHE.get(clazz);
Modified: trunk/src/main/org/jboss/seam/servlet/SeamListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/servlet/SeamListener.java 2009-04-01 00:37:47 UTC (rev 10261)
+++ trunk/src/main/org/jboss/seam/servlet/SeamListener.java 2009-04-01 07:03:21 UTC (rev 10262)
@@ -31,6 +31,7 @@
public void contextInitialized(ServletContextEvent event)
{
log.info( "Welcome to Seam " + Seam.getVersion() );
+ event.getServletContext().setAttribute( Seam.VERSION, Seam.getVersion() );
ServletLifecycle.beginApplication( event.getServletContext() );
new Initialization( event.getServletContext() ).create().init();
}
16 years, 8 months