[seam-commits] Seam SVN: r14389 - in branches/community/Seam_2_3: jboss-seam-debug/src/main/java/com/sun/facelets and 9 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Mar 14 13:35:46 EDT 2012
Author: manaRH
Date: 2012-03-14 13:35:46 -0400 (Wed, 14 Mar 2012)
New Revision: 14389
Added:
branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf2/
branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java
Removed:
branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/com/sun/facelets/StateWriterControl.java
branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Contexts.java
branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Introspector.java
branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java
branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/debug.xhtml
branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/faces-config.xml
branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/seam.properties
branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/DebugRedirect.java
branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugPhaseListener.java
branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugSerializationProvider.java
Modified:
branches/community/Seam_2_3/jboss-seam-debug/pom.xml
branches/community/Seam_2_3/jboss-seam-debug/src/main/java/com/sun/facelets/StateWriterControl.java
branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/Contexts.java
branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/faces-config.xml
Log:
jboss-seam-debug-jsf renamed to jboss-seam-debug
Modified: branches/community/Seam_2_3/jboss-seam-debug/pom.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/pom.xml 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug/pom.xml 2012-03-14 17:35:46 UTC (rev 14389)
@@ -6,36 +6,18 @@
<relativePath>../jboss-seam-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-debug</artifactId>
- <name>Seam Debug</name>
+ <artifactId>jboss-seam-debug-jsf2</artifactId>
+ <name>Seam Debug for JSF2</name>
<dependencies>
<dependency>
<groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
+ <artifactId>jboss-seam-jsf2</artifactId>
<type>ejb</type>
</dependency>
-
+
<dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- </dependency>
-
- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
@@ -47,6 +29,10 @@
<scope>provided</scope>
</dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.jboss.seam</groupId> -->
+<!-- <artifactId>jboss-seam-debug</artifactId> -->
+<!-- </dependency> -->
</dependencies>
<profiles>
@@ -92,6 +78,25 @@
</plugins>
</build>
</profile>
- </profiles>
+ <profile>
+ <id>jsf2</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
Modified: branches/community/Seam_2_3/jboss-seam-debug/src/main/java/com/sun/facelets/StateWriterControl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/java/com/sun/facelets/StateWriterControl.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/java/com/sun/facelets/StateWriterControl.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -13,13 +13,13 @@
* completely initialized).
*/
public class StateWriterControl {
- final static String STATEWRITER_CLASS_NAME = "com.sun.facelets.StateWriter";
+ final static String STATEWRITER_CLASS_NAME = "com.sun.faces.facelets.StateWriter";
static Class getStateWriter() {
try {
return Class.forName(STATEWRITER_CLASS_NAME);
} catch (Exception e) {
- throw new RuntimeException("Could not load class com.sun.facelets.StateWriter using reflection", e);
+ throw new RuntimeException("Could not load class com.sun.faces.facelets.StateWriter using reflection", e);
}
}
@@ -30,7 +30,7 @@
constructor.setAccessible(true);
constructor.newInstance(writer, 1024);
} catch (Exception e) {
- throw new RuntimeException("Could not initilise com.sun.facelets.StateWriter using reflection", e);
+ throw new RuntimeException("Could not initilise com.sun.faces.facelets.StateWriter using reflection", e);
}
}
@@ -42,7 +42,7 @@
Writer w = (Writer) meth.invoke(null);
return writer.cloneWithWriter(w);
} catch (Exception e) {
- throw new RuntimeException("Could not create clone of com.sun.facelets.StateWriter using reflection", e);
+ throw new RuntimeException("Could not create clone of com.sun.faces.facelets.StateWriter using reflection", e);
}
}
@@ -56,7 +56,7 @@
instMeth.setAccessible(true);
return (Boolean) instMeth.invoke(o);
} catch (Exception e) {
- throw new RuntimeException("Could not call isStateWritten on com.sun.facelets.StateWriter using reflection", e);
+ throw new RuntimeException("Could not call isStateWritten on com.sun.faces.facelets.StateWriter using reflection", e);
}
}
@@ -70,7 +70,7 @@
instMeth.setAccessible(true);
return (String) instMeth.invoke(o);
} catch (Exception e) {
- throw new RuntimeException("Could not call getAndResetBuffer on com.sun.facelets.StateWriter using reflection", e);
+ throw new RuntimeException("Could not call getAndResetBuffer on com.sun.faces.facelets.StateWriter using reflection", e);
}
}
@@ -84,7 +84,7 @@
instMeth.setAccessible(true);
instMeth.invoke(o);
} catch (Exception e) {
- throw new RuntimeException("Could not call release on com.sun.facelets.StateWriter using reflection",e);
+ throw new RuntimeException("Could not call release on com.sun.faces.facelets.StateWriter using reflection",e);
}
}
Modified: branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/Contexts.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/Contexts.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/Contexts.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -33,14 +33,20 @@
public String[] getSession()
{
- String[] names = org.jboss.seam.contexts.Contexts.getSessionContext().getNames();
+ String[] names={};
+ if(org.jboss.seam.contexts.Contexts.isSessionContextActive()) {
+ names = org.jboss.seam.contexts.Contexts.getSessionContext().getNames();
+ }
Arrays.sort(names);
return names;
}
public String[] getConversation()
{
- String[] names = org.jboss.seam.contexts.Contexts.getConversationContext().getNames();
+ String[] names = {};
+ if ( org.jboss.seam.contexts.Contexts.isConversationContextActive()) {
+ names = org.jboss.seam.contexts.Contexts.getConversationContext().getNames();
+ }
Arrays.sort(names);
return names;
}
@@ -61,7 +67,17 @@
public Exception getException()
{
- return (Exception) org.jboss.seam.contexts.Contexts.getConversationContext().get("org.jboss.seam.caughtException");
+ Exception e=null;
+ if(org.jboss.seam.contexts.Contexts.isConversationContextActive())
+ {
+ if(org.jboss.seam.contexts.Contexts.getConversationContext().get("org.jboss.seam.caughtException")==null) {
+ return null;
+ }
+ else {
+ e=(Exception)org.jboss.seam.contexts.Contexts.getConversationContext().get("org.jboss.seam.caughtException");
+ }
+ }
+ return e;
}
public List<Exception> getExceptionCauses()
Deleted: branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/DebugRedirect.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/DebugRedirect.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/DebugRedirect.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,31 +0,0 @@
-package org.jboss.seam.debug.jsf;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.faces.FacesManager;
-
- at Name("org.jboss.seam.debug.jsf.debugRedirect")
- at BypassInterceptors
- at Install(debug = true, precedence = BUILT_IN, classDependencies = "javax.faces.context.FacesContext")
-public class DebugRedirect
-{
- private String viewId;
-
- public String getViewId()
- {
- return viewId;
- }
-
- public void setViewId(String viewId)
- {
- this.viewId = viewId;
- }
-
- public void execute()
- {
- FacesManager.instance().redirect(viewId, null, false);
- }
-}
Deleted: branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugPhaseListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugPhaseListener.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugPhaseListener.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,125 +0,0 @@
-package org.jboss.seam.debug.jsf;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.net.URL;
-
-import javax.faces.application.StateManager;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.navigation.Pages;
-
-import com.sun.facelets.Facelet;
-import com.sun.facelets.StateWriterControl;
-import com.sun.facelets.compiler.SAXCompiler;
-import com.sun.facelets.impl.DefaultFaceletFactory;
-import com.sun.facelets.impl.DefaultResourceResolver;
-
-/**
- * Intercepts any request for a view-id like /debug.xxx and renders
- * the Seam debug page using facelets.
- *
- * @author Gavin King
- */
-public class SeamDebugPhaseListener implements PhaseListener
-{
- private static final String STATE_KEY = "~facelets.VIEW_STATE~";
-
- public void beforePhase(PhaseEvent event)
- {
- FacesLifecycle.setPhaseId( event.getPhaseId() ); //since this gets called before SeamPhaseListener!
-
- if ( Pages.isDebugPage() )
- {
- try
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- URL url = SeamDebugPhaseListener.class.getClassLoader().getResource("META-INF/debug.xhtml");
- Facelet f = new DefaultFaceletFactory( new SAXCompiler(), new DefaultResourceResolver() ).getFacelet(url);
- UIViewRoot viewRoot = facesContext.getViewRoot();
- f.apply(facesContext, viewRoot);
- HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
- response.setCharacterEncoding("UTF-8");
- response.setContentType("text/html; UTF-8");
- ResponseWriter originalWriter = facesContext.getRenderKit().createResponseWriter( response.getWriter(), "text/html", "UTF-8" );
- StateWriterControl.initialize(originalWriter);
- ResponseWriter writer = StateWriterControl.createClone(originalWriter);
- facesContext.setResponseWriter(writer);
- writer.startDocument();
- viewRoot.encodeAll(facesContext);
- writer.endDocument();
- writer.close();
- writeState(facesContext, originalWriter);
- originalWriter.flush();
- facesContext.responseComplete();
- }
- catch (IOException ioe)
- {
- throw new RuntimeException(ioe);
- }
- }
- }
-
- public void afterPhase(PhaseEvent event) {}
-
- public PhaseId getPhaseId()
- {
- return PhaseId.RENDER_RESPONSE;
- }
-
- private void writeState(FacesContext facesContext, Writer writer) throws IOException {
- try
- {
- if (StateWriterControl.isStateWritten())
- {
- String content = StateWriterControl.getAndResetBuffer();
- int end = content.indexOf(STATE_KEY);
- if (end >= 0)
- {
- StateManager stateMgr = facesContext.getApplication().getStateManager();
- Object stateObj = stateMgr.saveView(facesContext);
- String stateStr;
- if (stateObj == null)
- {
- stateStr = null;
- }
- else
- {
- stateMgr.writeState(facesContext, stateObj);
- stateStr = StateWriterControl.getAndResetBuffer();
- }
-
- int start = 0;
-
- while (end != -1)
- {
- writer.write(content, start, end - start);
- if (stateStr != null)
- {
- writer.write(stateStr);
- }
- start = end + STATE_KEY.length();
- end = content.indexOf(STATE_KEY, start);
- }
- writer.write(content, start, content.length() - start);
- }
- else
- {
- writer.write(content);
- }
- }
- }
- finally
- {
- StateWriterControl.release();
- }
- }
-
-}
Deleted: branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugSerializationProvider.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugSerializationProvider.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf/SeamDebugSerializationProvider.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,118 +0,0 @@
-package org.jboss.seam.debug.jsf;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.ObjectStreamClass;
-import java.io.OutputStream;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-import com.sun.faces.spi.SerializationProvider;
-
-
-/**
- * This serialization provider can be used by JSF when restoring the view. It will check
- * the hot deploy classloader(s) for class definitions that cannot be found in the context
- * classloader. It is only needed when using client side state saving with hotdeployable classes
- * in the view. To enable, add the following to web.xml:
- *
- * <pre>
- * <context-param>
- * <param-name>com.sun.faces.serializationProvider</param-name>
- * <param-value>org.jboss.seam.faces.SeamDebugSerializationProvider</param-value>
- * </context-param>
- * </pre>
- */
-public class SeamDebugSerializationProvider
- implements SerializationProvider
-{
-
- public ObjectInputStream createObjectInputStream(InputStream source) throws IOException {
- return new SeamObjectInputStream(source);
- }
-
- public ObjectOutputStream createObjectOutputStream(OutputStream destination) throws IOException {
- return new ObjectOutputStream(destination);
- }
-
-
- static class SeamObjectInputStream
- extends ObjectInputStream
- {
- private static final LogProvider log = Logging.getLogProvider(SeamObjectInputStream.class);
-
- public SeamObjectInputStream(InputStream source)
- throws IOException
- {
- super(source);
- }
-
- @Override
- protected Class<?> resolveClass(ObjectStreamClass desc)
- throws IOException,
- ClassNotFoundException
- {
- String className = desc.getName();
-
- try {
- return Class.forName(className,
- true,
- Thread.currentThread().getContextClassLoader());
- } catch (ClassNotFoundException e) {
- Class found = lookupInHotDeployLoaders(className);
- if (found != null) {
- return found;
- }
- // can't find it - rethrow the class not found exception
- throw e;
- }
- }
-
- private Class lookupInHotDeployLoaders(String className) {
- log.debug("need to check hotdeploy classloaders to resolve " + className);
-
- // this code can be made tighter if we assume there is only one hotdeployable location
- Set<ClassLoader> loaders = new HashSet<ClassLoader>();
- for (String name: Init.instance().getHotDeployableComponents()) {
- ClassLoader loader = loaderForComponent(name);
-
- // make sure we only try the loader once
- if (loaders.add(loader)) {
- Class c = tryToLoadClass(loader,className);
- if (c != null){
- return c;
- }
- }
- }
-
- return null;
- }
-
- private Class tryToLoadClass(ClassLoader loader, String className) {
- try {
- return loader.loadClass(className);
- } catch (Exception e) {
- log.debug("class not found in loader" + loader);
- return null;
- }
- }
-
- private ClassLoader loaderForComponent(String name) {
- Component component = (Component) Component.getInstance(name + ".component");
- if (component == null) {
- log.debug("Couldn't find component for " + name);
- return null;
- }
-
- return component.getBeanClass().getClassLoader();
- }
-
- }
-}
\ No newline at end of file
Copied: branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java (from rev 14388, branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java)
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java (rev 0)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -0,0 +1,135 @@
+package org.jboss.seam.debug.jsf2;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.net.URL;
+
+import javax.faces.application.StateManager;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.faces.view.facelets.ResourceResolver;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.seam.contexts.FacesLifecycle;
+import org.jboss.seam.navigation.Pages;
+
+import com.sun.facelets.StateWriterControl;
+import com.sun.faces.facelets.Facelet;
+import com.sun.faces.facelets.compiler.SAXCompiler;
+import com.sun.faces.facelets.impl.DefaultFaceletFactory;
+import com.sun.faces.facelets.impl.DefaultResourceResolver;
+
+/**
+ * Intercepts any request for a view-id like /debug.xxx and renders
+ * the Seam debug page using facelets.
+ *
+ * @author Gavin King
+ */
+public class SeamDebugPhaseListener implements PhaseListener
+{
+ private static final String STATE_KEY = "~facelets.VIEW_STATE~";
+
+ public void beforePhase(PhaseEvent event)
+ {
+ FacesLifecycle.setPhaseId( event.getPhaseId() ); //since this gets called before SeamPhaseListener!
+
+ if ( Pages.isDebugPage() )
+ {
+ try
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ URL url = SeamDebugPhaseListener.class.getClassLoader().getResource("META-INF/debug.xhtml");
+
+ ResourceResolver resroler=new ResourceResolver(){
+ @Override
+ public URL resolveUrl(String path)
+ {
+ return SeamDebugPhaseListener.class.getClassLoader().getResource(path);
+ }
+ };
+
+ Facelet f = new DefaultFaceletFactory( new SAXCompiler(),resroler).getFacelet(url);
+ UIViewRoot viewRoot = facesContext.getViewRoot();
+ f.apply(facesContext, viewRoot);
+ HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("text/html; UTF-8");
+ ResponseWriter originalWriter = facesContext.getRenderKit().createResponseWriter( response.getWriter(), "text/html", "UTF-8" );
+ StateWriterControl.initialize(originalWriter);
+ ResponseWriter writer = StateWriterControl.createClone(originalWriter);
+ facesContext.setResponseWriter(writer);
+ writer.startDocument();
+ viewRoot.encodeAll(facesContext);
+ writer.endDocument();
+ writer.close();
+ writeState(facesContext, originalWriter);
+ originalWriter.flush();
+ facesContext.responseComplete();
+ }
+ catch (IOException ioe)
+ {
+ throw new RuntimeException(ioe);
+ }
+ }
+ }
+
+ public void afterPhase(PhaseEvent event) {}
+
+ public PhaseId getPhaseId()
+ {
+ return PhaseId.RENDER_RESPONSE;
+ }
+
+ private void writeState(FacesContext facesContext, Writer writer) throws IOException {
+ try
+ {
+ if (StateWriterControl.isStateWritten())
+ {
+ String content = StateWriterControl.getAndResetBuffer();
+ int end = content.indexOf(STATE_KEY);
+ if (end >= 0)
+ {
+ StateManager stateMgr = facesContext.getApplication().getStateManager();
+ Object stateObj = stateMgr.saveView(facesContext);
+ String stateStr;
+ if (stateObj == null)
+ {
+ stateStr = null;
+ }
+ else
+ {
+ stateMgr.writeState(facesContext, stateObj);
+ stateStr = StateWriterControl.getAndResetBuffer();
+ }
+
+ int start = 0;
+
+ while (end != -1)
+ {
+ writer.write(content, start, end - start);
+ if (stateStr != null)
+ {
+ writer.write(stateStr);
+ }
+ start = end + STATE_KEY.length();
+ end = content.indexOf(STATE_KEY, start);
+ }
+ writer.write(content, start, content.length() - start);
+ }
+ else
+ {
+ writer.write(content);
+ }
+ }
+ }
+ finally
+ {
+ StateWriterControl.release();
+ }
+ }
+
+}
Modified: branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/faces-config.xml 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug/src/main/resources/META-INF/faces-config.xml 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
-<faces-config version="1.2"
+<faces-config version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<lifecycle>
- <phase-listener>org.jboss.seam.debug.jsf.SeamDebugPhaseListener</phase-listener>
+ <phase-listener>org.jboss.seam.debug.jsf2.SeamDebugPhaseListener</phase-listener>
</lifecycle>
</faces-config>
Deleted: branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/com/sun/facelets/StateWriterControl.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/com/sun/facelets/StateWriterControl.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/com/sun/facelets/StateWriterControl.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,91 +0,0 @@
-package com.sun.facelets;
-
-import java.io.Writer;
-import java.lang.reflect.*;
-
-import javax.faces.context.ResponseWriter;
-
-/**
- * This is a hack to instantiate a thread-local object that Facelets uses to
- * write the STATE_KEY into the response when directed by JSF. The STATE_KEY is
- * written in the case when there is a form on the page. This hack is necessary
- * since we are not calling Facelets in the normal way (and hence it is not
- * completely initialized).
- */
-public class StateWriterControl {
- final static String STATEWRITER_CLASS_NAME = "com.sun.faces.facelets.StateWriter";
-
- static Class getStateWriter() {
- try {
- return Class.forName(STATEWRITER_CLASS_NAME);
- } catch (Exception e) {
- throw new RuntimeException("Could not load class com.sun.faces.facelets.StateWriter using reflection", e);
- }
- }
-
- public static void initialize(Writer writer) {
- try {
- Class sw = getStateWriter();
- Constructor constructor = sw.getConstructor(Writer.class, int.class);
- constructor.setAccessible(true);
- constructor.newInstance(writer, 1024);
- } catch (Exception e) {
- throw new RuntimeException("Could not initilise com.sun.faces.facelets.StateWriter using reflection", e);
- }
- }
-
- public static ResponseWriter createClone(ResponseWriter writer) {
- try {
- Class sw = getStateWriter();
- Method meth = sw.getMethod("getCurrentInstance");
- meth.setAccessible(true);
- Writer w = (Writer) meth.invoke(null);
- return writer.cloneWithWriter(w);
- } catch (Exception e) {
- throw new RuntimeException("Could not create clone of com.sun.faces.facelets.StateWriter using reflection", e);
- }
- }
-
- public static boolean isStateWritten() {
- try {
- Class sw = getStateWriter();
- Method meth = sw.getMethod("getCurrentInstance");
- meth.setAccessible(true);
- Object o = meth.invoke(null);
- Method instMeth = sw.getMethod("isStateWritten");
- instMeth.setAccessible(true);
- return (Boolean) instMeth.invoke(o);
- } catch (Exception e) {
- throw new RuntimeException("Could not call isStateWritten on com.sun.faces.facelets.StateWriter using reflection", e);
- }
- }
-
- public static String getAndResetBuffer() {
- try {
- Class sw = getStateWriter();
- Method meth = sw.getMethod("getCurrentInstance");
- meth.setAccessible(true);
- Object o = meth.invoke(null);
- Method instMeth = sw.getMethod("getAndResetBuffer");
- instMeth.setAccessible(true);
- return (String) instMeth.invoke(o);
- } catch (Exception e) {
- throw new RuntimeException("Could not call getAndResetBuffer on com.sun.faces.facelets.StateWriter using reflection", e);
- }
- }
-
- public static void release() {
- try {
- Class sw = getStateWriter();
- Method meth = sw.getMethod("getCurrentInstance");
- meth.setAccessible(true);
- Object o = meth.invoke(null);
- Method instMeth = sw.getMethod("release");
- instMeth.setAccessible(true);
- instMeth.invoke(o);
- } catch (Exception e) {
- throw new RuntimeException("Could not call release on com.sun.faces.facelets.StateWriter using reflection",e);
- }
- }
-
-}
Deleted: branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Contexts.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Contexts.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Contexts.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,98 +0,0 @@
-package org.jboss.seam.debug;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.ConversationEntries;
-import org.jboss.seam.core.ConversationEntry;
-import org.jboss.seam.util.Exceptions;
-
- at Name("org.jboss.seam.debug.contexts")
- at Scope(ScopeType.APPLICATION)
- at Install(debug=true, precedence=BUILT_IN)
-public class Contexts
-{
- public List<ConversationEntry> getConversationEntries()
- {
- return new ArrayList<ConversationEntry>( ConversationEntries.instance().getConversationEntries() );
- }
-
- public String[] getApplication()
- {
- String[] names = org.jboss.seam.contexts.Contexts.getApplicationContext().getNames();
- Arrays.sort(names);
- return names;
- }
-
- public String[] getSession()
- {
- String[] names={};
- if(org.jboss.seam.contexts.Contexts.isSessionContextActive()) {
- names = org.jboss.seam.contexts.Contexts.getSessionContext().getNames();
- }
- Arrays.sort(names);
- return names;
- }
-
- public String[] getConversation()
- {
- String[] names = {};
- if ( org.jboss.seam.contexts.Contexts.isConversationContextActive()) {
- names = org.jboss.seam.contexts.Contexts.getConversationContext().getNames();
- }
- Arrays.sort(names);
- return names;
- }
-
- public String[] getBusinessProcess()
- {
- if ( org.jboss.seam.contexts.Contexts.isBusinessProcessContextActive() )
- {
- String[] names = org.jboss.seam.contexts.Contexts.getBusinessProcessContext().getNames();
- Arrays.sort(names);
- return names;
- }
- else
- {
- return null;
- }
- }
-
- public Exception getException()
- {
- Exception e=null;
- if(org.jboss.seam.contexts.Contexts.isConversationContextActive())
- {
- if(org.jboss.seam.contexts.Contexts.getConversationContext().get("org.jboss.seam.caughtException")==null) {
- return null;
- }
- else {
- e=(Exception)org.jboss.seam.contexts.Contexts.getConversationContext().get("org.jboss.seam.caughtException");
- }
- }
- return e;
- }
-
- public List<Exception> getExceptionCauses()
- {
- List<Exception> causes = new ArrayList<Exception>();
- for (Exception cause=getException(); cause!=null; cause=Exceptions.getCause(cause))
- {
- causes.add(cause);
- }
- return causes;
- }
-
- public boolean isExceptionExists()
- {
- return getException()!=null;
- }
-
-}
Deleted: branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Introspector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Introspector.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/Introspector.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,153 +0,0 @@
-package org.jboss.seam.debug;
-
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.contexts.Contexts;
-
- at Name("org.jboss.seam.debug.introspector")
- at Install(debug=true, precedence=BUILT_IN)
-public class Introspector {
-
- @RequestParameter
- private String name;
-
- public Attribute[] getAttributes() throws Exception
- {
- if (name==null) return null;
- Object component = Contexts.lookupInStatefulContexts(name);
- if (component==null)
- {
- return null;
- }
- else if (component instanceof Map)
- {
- return getMapAttributes( (Map) component );
- }
- else if (component instanceof List)
- {
- return getListAttributes( (List) component );
- }
- else
- {
- return getComponentAttributes(component);
- }
- }
-
- public Attribute[] getMapAttributes(Map<Object, Object> map)
- {
- Attribute[] attributes = new Attribute[map.size()];
- int i=0;
- for( Map.Entry me: map.entrySet() )
- {
- attributes[i++] = new Attribute( me.getKey().toString(), me.getValue() );
- }
- return attributes;
- }
-
- public Attribute[] getListAttributes(List list)
- {
- Attribute[] attributes = new Attribute[list.size()];
- for(int i=0; i<list.size(); i++ )
- {
- attributes[i] = new Attribute( Integer.toString(i), list.get(i) );
- }
- return attributes;
- }
-
- private Attribute[] getComponentAttributes(Object component) throws IntrospectionException, IllegalAccessException {
- BeanInfo bi = java.beans.Introspector.getBeanInfo( component.getClass() );
- //MethodDescriptor[] methods = bi.getMethodDescriptors();
- PropertyDescriptor[] properties = bi.getPropertyDescriptors();
- Attribute[] attributes = new Attribute[properties.length+1];
- for (int i=0; i<properties.length; i++)
- {
- Object value;
- try
- {
- Method readMethod = properties[i].getReadMethod();
- if (readMethod==null) continue;
- value = readMethod.invoke(component);
- }
- catch (InvocationTargetException ite)
- {
- Throwable e = ite.getCause();
- value = toString(e);
- }
-
- boolean convertArrayToList = value!=null &&
- value.getClass().isArray() &&
- !value.getClass().getComponentType().isPrimitive();
- if ( convertArrayToList )
- {
- value = Arrays.asList( (Object[]) value );
- }
-
- attributes[i] = new Attribute( properties[i].getDisplayName(), value );
- }
-
- String toString;
- try
- {
- toString = component.toString();
- }
- catch (Exception e)
- {
- toString = e.getClass().getName() + '[' + e.getMessage() + ']';
- }
- attributes[properties.length] = new Attribute("toString()", toString);
-
- return attributes;
- }
-
- private static String toString(Throwable e)
- {
- return e.getClass().getName() + '[' + e.getMessage() + ']';
- }
-
- public static class Attribute
- {
- private String name;
- private Object value;
-
- public Attribute(String name, Object value)
- {
- this.name = name;
- this.value = value;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Object getValue()
- {
- return value;
- }
-
- public String getStringValue()
- {
- try
- {
- return value==null ? null : value.toString();
- }
- catch (Throwable e)
- {
- return Introspector.toString(e);
- }
- }
-
- }
-}
Deleted: branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/java/org/jboss/seam/debug/jsf2/SeamDebugPhaseListener.java 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,135 +0,0 @@
-package org.jboss.seam.debug.jsf2;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.net.URL;
-
-import javax.faces.application.StateManager;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.faces.view.facelets.ResourceResolver;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.contexts.FacesLifecycle;
-import org.jboss.seam.navigation.Pages;
-
-import com.sun.facelets.StateWriterControl;
-import com.sun.faces.facelets.Facelet;
-import com.sun.faces.facelets.compiler.SAXCompiler;
-import com.sun.faces.facelets.impl.DefaultFaceletFactory;
-import com.sun.faces.facelets.impl.DefaultResourceResolver;
-
-/**
- * Intercepts any request for a view-id like /debug.xxx and renders
- * the Seam debug page using facelets.
- *
- * @author Gavin King
- */
-public class SeamDebugPhaseListener implements PhaseListener
-{
- private static final String STATE_KEY = "~facelets.VIEW_STATE~";
-
- public void beforePhase(PhaseEvent event)
- {
- FacesLifecycle.setPhaseId( event.getPhaseId() ); //since this gets called before SeamPhaseListener!
-
- if ( Pages.isDebugPage() )
- {
- try
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- URL url = SeamDebugPhaseListener.class.getClassLoader().getResource("META-INF/debug.xhtml");
-
- ResourceResolver resroler=new ResourceResolver(){
- @Override
- public URL resolveUrl(String path)
- {
- return SeamDebugPhaseListener.class.getClassLoader().getResource(path);
- }
- };
-
- Facelet f = new DefaultFaceletFactory( new SAXCompiler(),resroler).getFacelet(url);
- UIViewRoot viewRoot = facesContext.getViewRoot();
- f.apply(facesContext, viewRoot);
- HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
- response.setCharacterEncoding("UTF-8");
- response.setContentType("text/html; UTF-8");
- ResponseWriter originalWriter = facesContext.getRenderKit().createResponseWriter( response.getWriter(), "text/html", "UTF-8" );
- StateWriterControl.initialize(originalWriter);
- ResponseWriter writer = StateWriterControl.createClone(originalWriter);
- facesContext.setResponseWriter(writer);
- writer.startDocument();
- viewRoot.encodeAll(facesContext);
- writer.endDocument();
- writer.close();
- writeState(facesContext, originalWriter);
- originalWriter.flush();
- facesContext.responseComplete();
- }
- catch (IOException ioe)
- {
- throw new RuntimeException(ioe);
- }
- }
- }
-
- public void afterPhase(PhaseEvent event) {}
-
- public PhaseId getPhaseId()
- {
- return PhaseId.RENDER_RESPONSE;
- }
-
- private void writeState(FacesContext facesContext, Writer writer) throws IOException {
- try
- {
- if (StateWriterControl.isStateWritten())
- {
- String content = StateWriterControl.getAndResetBuffer();
- int end = content.indexOf(STATE_KEY);
- if (end >= 0)
- {
- StateManager stateMgr = facesContext.getApplication().getStateManager();
- Object stateObj = stateMgr.saveView(facesContext);
- String stateStr;
- if (stateObj == null)
- {
- stateStr = null;
- }
- else
- {
- stateMgr.writeState(facesContext, stateObj);
- stateStr = StateWriterControl.getAndResetBuffer();
- }
-
- int start = 0;
-
- while (end != -1)
- {
- writer.write(content, start, end - start);
- if (stateStr != null)
- {
- writer.write(stateStr);
- }
- start = end + STATE_KEY.length();
- end = content.indexOf(STATE_KEY, start);
- }
- writer.write(content, start, content.length() - start);
- }
- else
- {
- writer.write(content);
- }
- }
- }
- finally
- {
- StateWriterControl.release();
- }
- }
-
-}
Deleted: branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/debug.xhtml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/debug.xhtml 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/debug.xhtml 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,255 +0,0 @@
-<!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:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html">
-<f:view>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>JBoss Seam Debug Page</title>
- <style type="text/css">
- body, div, span, td, th, caption { font-family: 'Trebuchet MS', Verdana, Arial, Sans-Serif; font-size: small; }
- ul, li, pre { padding: 0; margin: 0; }
- h1 { color: #090; }
- h1 a { text-decoration: none; color: #090; }
- h2, h2 span { font-size: large; color: #339; }
- h2 a { text-decoration: none; color: #339; }
- pre { padding: 8px; margin: 10px 0; border: 1px solid #CCC; background-color: #f9f9f9; }
- #applicationContext { display: none; }
- #attributes, #conversationContext, #sessionContext, #processContext { display: block; }
- code { font-size: medium; }
- table { border: 1px solid #CCC; border-collapse: collapse; border-spacing: 0px; width: 100%; text-align: left; }
- td { border: 1px solid #CCC; }
- thead tr th { padding: 2px; color: #030; background-color: #F9F9F9; }
- tbody tr td { padding: 5px 3px; }
- table caption { text-align: left; padding: 5px 0; font-size: large; }
- </style>
- <style type="text/css" media="print">
- #sessionContext, #conversationContext, #applicationContext, #attributes, #processContext { display: block; }
- </style>
- <script language="Javascript" type="text/javascript">
- SeamDebugPage = {};
- SeamDebugPage.toggle = function(id) {
- var el = document.getElementById(id);
- var displayStyle = SeamDebugPage.getDisplayStyle(el);
- if ("block" == displayStyle) {
- el.style.display = "none";
- document.getElementById(id+"Off").style.display = "inline";
- document.getElementById(id+"On").style.display = "none";
- }
- else {
- el.style.display = "block";
- document.getElementById(id+"Off").style.display = "none";
- document.getElementById(id+"On").style.display = "inline";
- }
- }
- SeamDebugPage.getDisplayStyle = function(el) {
- var value = el.style.display;
-
- if (!value) {
- if (document.defaultView) {
- value = document.defaultView.getComputedStyle(el, "").getPropertyValue("display");
- }
- else if (el.currentStyle) {
- value = el.currentStyle.display;
- }
- }
- return value;
- }
- function foo() {}
- </script>
- </head>
- <body>
- <h1><h:outputLink value="#{facesContext.externalContext.request.requestURI}">JBoss Seam Debug Page</h:outputLink></h1>
- <div>
- This page allows you to browse and inspect components in any of the Seam
- contexts associated with the current session. It also shows a list of
- active, long-running conversations. You can select a conversation to view
- its contents or destroy it.
- </div>
-
- <h2>Conversations</h2>
- <h:outputText value="No long-running conversations exist"
- rendered="#{empty org.jboss.seam.debug.contexts.conversationEntries}"/>
- <h:form rendered="#{not empty org.jboss.seam.debug.contexts.conversationEntries}">
- <h:dataTable var="_entry" value="#{org.jboss.seam.debug.contexts.conversationEntries}">
- <h:column>
- <f:facet name="header">Conversation ID</f:facet>
- #{_entry.id}
- </h:column>
- <h:column>
- <f:facet name="header">Nested?</f:facet>
- #{_entry.nested}
- </h:column>
- <h:column>
- <f:facet name="header">Activity</f:facet>
- <h:outputText value="#{_entry.startDatetime}">
- <f:convertDateTime type="time" timeZone="#{timeZone}"/>
- </h:outputText>
- #{' - '}
- <h:outputText value="#{_entry.lastDatetime}">
- <f:convertDateTime type="time" timeZone="#{timeZone}"/>
- </h:outputText>
- </h:column>
- <h:column>
- <f:facet name="header">Description</f:facet>
- #{_entry.description}
- </h:column>
- <h:column>
- <f:facet name="header">View ID</f:facet>
- #{_entry.viewId}
- </h:column>
- <h:column>
- <f:facet name="header">Action</f:facet>
- <h:outputLink>
- Select
- <f:param name="#{manager.conversationIdParameter}" value="#{_entry.id}"/>
- </h:outputLink>
- #{' '}
- <h:commandLink actionListener="#{_entry.destroy}" action="#{org.jboss.seam.debug.jsf.debugRedirect.execute}" value="Destroy">
- <f:setPropertyActionListener target="#{org.jboss.seam.debug.jsf.debugRedirect.viewId}" value="#{view.viewId}"/>
- </h:commandLink>
- </h:column>
- </h:dataTable>
- </h:form>
-
- <h2>
- <a href="#" onclick="SeamDebugPage.toggle('attributes'); return false;">
- <span id="attributesOff" style="display: none;">+</span>
- <span id="attributesOn">-</span>
-  Component 
- <h:outputText value="(#{param['name']})"
- rendered="#{org.jboss.seam.debug.introspector.attributes!=null}"/>
- <h:outputText value="(None selected)"
- rendered="#{org.jboss.seam.debug.introspector.attributes==null}"/>
- </a>
- </h2>
- <div id="attributes">
- <h:outputText value="Select a component from one of the contexts below"
- rendered="#{org.jboss.seam.debug.introspector.attributes==null}"/>
- <h:dataTable value="#{org.jboss.seam.debug.introspector.attributes}"
- rendered="#{org.jboss.seam.debug.introspector.attributes!=null}"
- var="attribute">
- <h:column>
- #{attribute.name}
- </h:column>
- <h:column>
- #{attribute.stringValue}
- </h:column>
- </h:dataTable>
- </div>
-
- <h2>
- <a href="#" onclick="SeamDebugPage.toggle('conversationContext'); return false;">
- <span id="conversationContextOff" style="display: none;">+</span>
- <span id="conversationContextOn">-</span>
-  Conversation Context 
- <h:outputText value="(#{manager.currentConversationId})"
- rendered="#{manager.longRunningConversation}"/>
- <h:outputText value="(None selected)"
- rendered="#{!manager.longRunningConversation}"/>
- </a>
- </h2>
- <div id="conversationContext">
- <h:outputText value="Empty conversation context"
- rendered="#{empty org.jboss.seam.debug.contexts.conversation}"/>
- <h:dataTable value="#{org.jboss.seam.debug.contexts.conversation}"
- var="name">
- <h:column>
- <h:outputLink>
- #{name}
- <f:param name="name" value="#{name}"/>
- <f:param name="#{manager.conversationIdParameter}" value="#{conversation.id}"/>
- </h:outputLink>
- </h:column>
- </h:dataTable>
- </div>
-
- <h2>
- <a href="#" onclick="SeamDebugPage.toggle('processContext'); return false;">
- <span id="processContextOff" style="display: none;">+</span>
- <span id="processContextOn">-</span>
-  Business Process Context
- </a>
- </h2>
- <div id="processContext">
- <h:outputText value="Empty business process context"
- rendered="#{empty org.jboss.seam.debug.contexts.businessProcess}"/>
- <h:dataTable value="#{org.jboss.seam.debug.contexts.businessProcess}"
- var="name">
- <h:column>
- <h:outputLink>
- #{name}
- <f:param name="name" value="#{name}"/>
- <f:param name="#{manager.conversationIdParameter}" value="#{conversation.id}"/>
- </h:outputLink>
- </h:column>
- </h:dataTable>
- </div>
-
- <h2>
- <a href="#" onclick="SeamDebugPage.toggle('sessionContext'); return false;">
- <span id="sessionContextOff" style="display: none;">+</span>
- <span id="sessionContextOn">-</span>
-  Session Context
- </a>
- </h2>
- <div id="sessionContext">
- <h:outputText value="Empty session context"
- rendered="#{empty org.jboss.seam.debug.contexts.session}"/>
- <h:dataTable value="#{org.jboss.seam.debug.contexts.session}"
- var="name">
- <h:column>
- <h:outputLink>
- #{name}
- <f:param name="name" value="#{name}"/>
- <f:param name="#{manager.conversationIdParameter}" value="#{conversation.id}"/>
- </h:outputLink>
- </h:column>
- </h:dataTable>
- </div>
-
- <h2>
- <a href="#" onclick="SeamDebugPage.toggle('applicationContext'); return false;">
- <span id="applicationContextOff">+</span>
- <span id="applicationContextOn" style="display: none;">-</span>
-  Application Context
- </a>
- </h2>
- <div id="applicationContext">
- <h:dataTable value="#{org.jboss.seam.debug.contexts.application}"
- var="name">
- <h:column>
- <h:outputLink>
- #{name}
- <f:param name="name" value="#{name}"/>
- <f:param name="#{manager.conversationIdParameter}" value="#{conversation.id}"/>
- </h:outputLink>
- </h:column>
- </h:dataTable>
- </div>
-
- <f:subview rendered="#{org.jboss.seam.debug.contexts.exceptionExists}">
- <h2>
- <a href="#" onclick="SeamDebugPage.toggle('stackTrace'); return false;">
- <span id="stackTraceOff" style="display: none;">+</span>
- <span id="stackTraceOn">-</span>
-  Exception
- </a>
- </h2>
- <div id="stackTrace">
- Exception during request processing:
- <ui:repeat value="#{org.jboss.seam.debug.contexts.exceptionCauses}" var="exception">
- <div>
- Caused by #{exception.class.name} with message: "#{exception.getMessage()}"
- <pre><ui:repeat value="#{exception.stackTrace}" var="stackElement">
-#{stackElement}</ui:repeat></pre>
- </div>
- </ui:repeat>
- </div>
- </f:subview>
-
- </body>
-</f:view>
-</html>
Deleted: branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/faces-config.xml 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/META-INF/faces-config.xml 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<faces-config version="2.0"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
-
- <lifecycle>
- <phase-listener>org.jboss.seam.debug.jsf2.SeamDebugPhaseListener</phase-listener>
- </lifecycle>
-
-</faces-config>
Deleted: branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/seam.properties
===================================================================
--- branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/seam.properties 2012-03-14 17:34:37 UTC (rev 14388)
+++ branches/community/Seam_2_3/jboss-seam-debug-jsf2/src/main/resources/seam.properties 2012-03-14 17:35:46 UTC (rev 14389)
@@ -1 +0,0 @@
-
More information about the seam-commits
mailing list