Author: alexsmirnov
Date: 2008-11-18 20:04:10 -0500 (Tue, 18 Nov 2008)
New Revision: 11229
Added:
trunk/docs/xslt/
trunk/docs/xslt/en/
trunk/framework/jsf-test/src/main/javadoc/
trunk/framework/jsf-test/src/main/javadoc/org/
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/package.html
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/staging/
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/staging/package.html
trunk/test-applications/ajaxTest/.metadata/
trunk/test-applications/ajaxTest/.metadata/src/
trunk/test-applications/ajaxTest/.metadata/src/main/
trunk/test-applications/ajaxTest/.metadata/src/main/webapp/
trunk/test-applications/ajaxTest/.metadata/src/main/webapp/WEB-INF/
trunk/test-applications/ajaxTest/.metadata/src/main/webapp/WEB-INF/faces-config.pageflow
trunk/test-applications/ajaxTest/src/main/java/org/
trunk/test-applications/ajaxTest/src/main/java/org/richfaces/
trunk/test-applications/ajaxTest/src/main/java/org/richfaces/Bean.java
trunk/test-applications/ajaxTest/src/main/webapp/
trunk/test-applications/ajaxTest/src/main/webapp/META-INF/
trunk/test-applications/ajaxTest/src/main/webapp/META-INF/MANIFEST.MF
trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/
trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/classes/
trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/lib/
trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml
Removed:
trunk/test-applications/ajaxTest/src/main/java/Bean.java
trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml
trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml
Modified:
trunk/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebClient.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/TestException.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java
trunk/test-applications/ajaxTest/pom.xml
trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java
Log:
Edit Javadoc comments in the public classes
Modified:
trunk/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java
===================================================================
---
trunk/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java 2008-11-18
22:44:40 UTC (rev 11228)
+++
trunk/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -22,37 +22,64 @@
import javax.faces.webapp.FacesServlet;
import javax.servlet.Filter;
+import junit.framework.TestCase;
+
import org.junit.After;
import org.junit.Before;
import org.richfaces.test.staging.FilterContainer;
-import org.richfaces.test.staging.RequestChain;
import org.richfaces.test.staging.ServletContainer;
import org.richfaces.test.staging.StagingConnection;
import org.richfaces.test.staging.StagingServer;
/**
+ * Base class for all JSF test cases.
* @author asmirnov
*
*/
-public abstract class AbstractFacesTest {
+public abstract class AbstractFacesTest extends TestCase {
private ClassLoader contextClassLoader;
+ /**
+ * Prepared test server instance. Populated by the default {@link #setUp()} method.
+ */
protected StagingServer facesServer;
+ /**
+ * Current virtual connection. This field populated by the {@link #setupWebContent()}
method only.
+ */
protected StagingConnection connection;
+ /**
+ * Current {@link FacesContext} instance. This field populated by the {@link
#setupWebContent()} method only.
+ */
protected FacesContext facesContext;
+ /**
+ * JSF {@link Lifecycle} instance. Populated by the default {@link #setUp()} method.
+ */
protected Lifecycle lifecycle;
+ /**
+ * JSF {@link Application} instance. Populated by the default {@link #setUp()} method.
+ */
protected Application application;
/**
+ * Setup staging server instance with JSF implementation. First, this method creates a
local test instance
+ * and calls the other template method in the next sequence:
+ * <ol>
+ * <li>{@link #setupFacesServlet()}</li>
+ * <li>{@link #setupFacesListener()}</li>
+ * <li>{@link #setupJsfInitParameters()}</li>
+ * <li>{@link #setupWebContent()}</li>
+ * </ol>
+ * After them, test server is initialized as well as fields {@link #lifecycle} and
{@link #application} populated.
+ * Also, if the resource "logging.properties" is exist in the test class
package, The Java {@link LogManager} will be configured with its content.
* @throws java.lang.Exception
*/
@Before
- public void setUpServer() throws Exception {
+ public void setUp() throws Exception {
contextClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
@@ -74,6 +101,7 @@
facesServer = new StagingServer();
setupFacesServlet();
setupFacesListener();
+ setupJsfInitParameters();
setupWebContent();
facesServer.init();
ApplicationFactory applicationFactory = (ApplicationFactory) FactoryFinder
@@ -86,18 +114,22 @@
}
/**
- *
+ * This hook method called from the {@link #setUp()} should append JSF implementation
+ * listener to the test server. Default version applends
"com.sun.faces.config.ConfigureListener"
+ * or "org.apache.myfaces.webapp.StartupServletContextListener" for the
existed SUN RI or MyFaces implementation.
+ * This metod also calls appropriate {@link #setupSunFaces()} or {@link #setupMyFaces()}
methods.
*/
protected void setupFacesListener() {
EventListener listener = null;
try {
+ // Check Sun RI configuration listener class.
Class<? extends EventListener> listenerClass = contextClassLoader
.loadClass("com.sun.faces.config.ConfigureListener")
.asSubclass(EventListener.class);
listener = listenerClass.newInstance();
setupSunFaces();
} catch (ClassNotFoundException e) {
- // No JSF RI listener
+ // No JSF RI listener, check MyFaces.
Class<? extends EventListener> listenerClass;
try {
listenerClass = contextClassLoader
@@ -119,8 +151,10 @@
}
/**
- * @throws InstantiationException
- * @throws IllegalAccessException
+ * This template method called from {@link #setUp()} to create {@link FacesServlet}
instance.
+ * The default implementation also tests presense of the "org.ajax4jsf.Filter"
class.
+ * If this class is avalable, these instance appended to the Faces Servlet call chain.
+ * Default mapping to the FacesServlet instance is "*.jsf"
*/
protected void setupFacesServlet() {
ServletContainer facesServletContainer = new ServletContainer("*.jsf",
@@ -145,6 +179,13 @@
} catch (Exception e) {
throw new TestException(e);
}
+ }
+
+ /**
+ * This template method called from {@link #setUp()} to append appropriate init
parameters to the test server.
+ * The default implementation sets state saving method to the "server" and
default jsf page suffix to the ".xhtml"
+ */
+ protected void setupJsfInitParameters() {
facesServer.addInitParameter(
StateManager.STATE_SAVING_METHOD_PARAM_NAME,
StateManager.STATE_SAVING_METHOD_SERVER);
@@ -152,23 +193,45 @@
".xhtml");
}
+ /**
+ * This template method called from the {@link #setupFacesListener()} if MyFaces
implementation presents.
+ * The default implementation does nothing.
+ */
protected void setupMyFaces() {
// Do nothing by default.
}
+ /**
+ * This template method called from the {@link #setupFacesListener()} if Sun JSF
reference implementation presents.
+ * The default implementation sets the "com.sun.faces.validateXml"
"com.sun.faces.verifyObjects" init parameters to the "true"
+ */
protected void setupSunFaces() {
facesServer.addInitParameter("com.sun.faces.validateXml", "true");
facesServer.addInitParameter("com.sun.faces.verifyObjects",
"true");
}
+ /**
+ * This template method called from the {@link #setUp()} to populate virtual server
content.
+ * The default implementation do nothing.
+ */
protected void setupWebContent() {
}
+ /**
+ * Setup virtual server connection to run tests inside JSF lifecycle.
+ * The default implementation setups virtual request to the
"http://localhost/test.jsf" URL and creates {@link FacesContext} instance.
+ * Two template methods are called :
+ * <ol>
+ * <li>{@link #setupConnection()} to prepare request method, parameters, headers
and so</li>
+ * <li>{@link #setupView()} to create default view.</li>
+ * </ol>
+ * @throws Exception
+ */
protected void setupFacesRequest() throws Exception {
connection = facesServer.getConnection(new URL(
"http://localhost/test.jsf"));
- setupConnection(connection);
+ setupConnection();
connection.start();
FacesContextFactory facesContextFactory = (FacesContextFactory) FactoryFinder
.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
@@ -181,21 +244,31 @@
}
}
+ /**
+ * This template method called from the {@link #setupFacesRequest()} to create
components view tree in the virtual request.
+ * The default implementation is only creates {@link UIViewRoot} instance for view ID
"/test.xhtml".
+ * @return
+ */
protected UIViewRoot setupView() {
UIViewRoot viewRoot = (UIViewRoot)
application.createComponent(UIViewRoot.COMPONENT_TYPE);
viewRoot.setViewId("/test.xhtml");
return viewRoot;
}
- protected void setupConnection(StagingConnection connection) {
+ /**
+ * This template method called from the {@link #setupFacesRequest()} to setup additional
virtual connection parameters.
+ * The default implementation does nothing.
+ */
+ protected void setupConnection() {
}
/**
+ * Virtual server instance cleanup.
* @throws java.lang.Exception
*/
@After
- public void tearDownServer() throws Exception {
+ public void tearDown() throws Exception {
if (null != facesContext) {
facesContext.release();
facesContext = null;
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebClient.java
===================================================================
---
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebClient.java 2008-11-18
22:44:40 UTC (rev 11228)
+++
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebClient.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -11,6 +11,10 @@
import com.gargoylesoftware.htmlunit.WebConnection;
/**
+ * Modified version of the HtmlUnit {@link WebClient}. This subclass uses {@link
LocalWebConnection} by default,
+ * to perform requests to the local saging server {@link StagingServer} instead of real
network request.
+ * It is also setup synchonous ajax controller {@link
WebClient#setAjaxController(com.gargoylesoftware.htmlunit.AjaxController)},
+ * to avoid thread syncronisation problem.
* @author asmirnov
*
*/
@@ -22,7 +26,8 @@
private transient WebConnection webConnection;
/**
- *
+ * Create WebConnection instance for the given {@link StagingServer}
+ * @param server test server instance.
*/
public LocalWebClient(StagingServer server) {
super();
@@ -31,6 +36,8 @@
}
/**
+ * Create WebConnection instance for the given {@link StagingServer} and browser
version.
+ * @param server test server instance.
* @param browserVersion
*/
public LocalWebClient(StagingServer server,BrowserVersion browserVersion) {
@@ -40,8 +47,10 @@
}
/**
+ * Overwride default webConnection.
* @return the webConnection
*/
+ @Override
public WebConnection getWebConnection() {
if (this.webConnection == null) {
this.webConnection = new LocalWebConnection(server);
@@ -53,6 +62,7 @@
/**
* @param webConnection the webConnection to set
*/
+ @Override
public void setWebConnection(WebConnection webConnection) {
this.webConnection = webConnection;
}
Modified:
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java
===================================================================
---
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java 2008-11-18
22:44:40 UTC (rev 11228)
+++
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -17,7 +17,16 @@
import com.gargoylesoftware.htmlunit.WebRequestSettings;
import com.gargoylesoftware.htmlunit.WebResponse;
+/**
+ * This implementation of the HtmlUnit {@link WebConnection} execute http requests on the
local
+ * staging server instead of the real network connection.
+ * @author asmirnov
+ *
+ */
public final class LocalWebConnection implements WebConnection {
+ /**
+ * test server instance
+ */
private final StagingServer localServer;
/**
@@ -27,9 +36,13 @@
this.localServer = localServer;
}
+ /* (non-Javadoc)
+ * @see
com.gargoylesoftware.htmlunit.WebConnection#getResponse(com.gargoylesoftware.htmlunit.WebRequestSettings)
+ */
public WebResponse getResponse(WebRequestSettings settings)
throws IOException {
StagingConnection connection = localServer.getConnection(settings.getUrl());
+ // Propagate web request settings to the local connection.
for (NameValuePair param : settings.getRequestParameters()) {
connection.addRequestParameter(param.getName(), param.getValue());
}
@@ -41,6 +54,8 @@
connection.setRequestBody(body);
connection.setRequestContentType(contentType);
connection.addRequestHeaders(settings.getAdditionalHeaders());
+ // HtmlUnit uses request parameters map for the form submit, but does not parse
+ // XMLHttpRequest content.
if(null != body &&
FormEncodingType.URL_ENCODED.getName().equals(contentType)){
connection.parseFormParameters(body);
}
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java
===================================================================
---
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java 2008-11-18
22:44:40 UTC (rev 11228)
+++
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -6,10 +6,8 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import java.util.Map.Entry;
@@ -19,7 +17,13 @@
import com.gargoylesoftware.htmlunit.WebRequestSettings;
import com.gargoylesoftware.htmlunit.WebResponse;
-public final class LocalWebResponse implements WebResponse {
+/**
+ * This implementation realise WebResponse wrapper for a staging server connection.
+ * This class for an internal use only.
+ * @author asmirnov
+ *
+ */
+final class LocalWebResponse implements WebResponse {
private final WebRequestSettings settings;
private final StagingConnection serverConnection;
@@ -28,14 +32,23 @@
this.serverConnection = serverConnection;
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getContentAsStream()
+ */
public InputStream getContentAsStream() throws IOException {
return new ByteArrayInputStream(getResponseBody());
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getContentAsString()
+ */
public String getContentAsString() {
return serverConnection.getContentAsString();
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getContentCharSet()
+ */
public String getContentCharSet() {
return serverConnection.getCharacterEncoding();
}
@@ -44,39 +57,66 @@
return serverConnection.getContentType();
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getLoadTimeInMilliSeconds()
+ */
public long getLoadTimeInMilliSeconds() {
return 0;
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getRequestMethod()
+ */
public com.gargoylesoftware.htmlunit.HttpMethod getRequestMethod() {
return
com.gargoylesoftware.htmlunit.HttpMethod.valueOf(serverConnection.getMethod().toString());
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getRequestSettings()
+ */
public WebRequestSettings getRequestSettings() {
return settings;
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getResponseBody()
+ */
public byte[] getResponseBody() {
return serverConnection.getResponseBody();
}
+ /* (non-Javadoc)
+ * @see
com.gargoylesoftware.htmlunit.WebResponse#getResponseHeaderValue(java.lang.String)
+ */
public String getResponseHeaderValue(String headerName) {
// TODO Auto-generated method stub
return null;
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getStatusCode()
+ */
public int getStatusCode() {
return serverConnection.getStatus();
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getStatusMessage()
+ */
public String getStatusMessage() {
return serverConnection.getErrorMessage();
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getUrl()
+ */
public URL getUrl() {
return serverConnection.getUrl();
}
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getResponseHeaders()
+ */
public List<NameValuePair> getResponseHeaders() {
ArrayList<NameValuePair> headers = new ArrayList<NameValuePair>(10);
for (Entry<String, String[]> entry :
serverConnection.getResponseHeaders().entrySet()) {
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/TestException.java
===================================================================
---
trunk/framework/jsf-test/src/main/java/org/richfaces/test/TestException.java 2008-11-18
22:44:40 UTC (rev 11228)
+++
trunk/framework/jsf-test/src/main/java/org/richfaces/test/TestException.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -3,17 +3,21 @@
*/
package org.richfaces.test;
+import org.richfaces.test.staging.StagingServer;
+
/**
+ * Internal runtame exception for the {@link StagingServer} engine.
* @author asmirnov
*
*/
+@SuppressWarnings("serial")
public class TestException extends RuntimeException {
/**
*
*/
public TestException() {
- // TODO Auto-generated constructor stub
+ super();
}
/**
@@ -21,7 +25,6 @@
*/
public TestException(String message) {
super(message);
- // TODO Auto-generated constructor stub
}
/**
@@ -29,7 +32,6 @@
*/
public TestException(Throwable cause) {
super(cause);
- // TODO Auto-generated constructor stub
}
/**
@@ -38,7 +40,6 @@
*/
public TestException(String message, Throwable cause) {
super(message, cause);
- // TODO Auto-generated constructor stub
}
}
Modified:
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java
===================================================================
---
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java 2008-11-18
22:44:40 UTC (rev 11228)
+++
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -70,20 +70,16 @@
private final Map<String, String> mimeTypes = new HashMap<String,
String>();
-
private InvocationListener invocationListener;
-
private StagingServletContext context;
-
+
private ServletContext contextProxy;
-
private ServerHttpSession session;
private HttpSession sessionProxy;
-
private class LocalContext extends StagingServletContext {
/*
@@ -365,7 +361,8 @@
}
/**
- * @param invocationListener the invocationListener to set
+ * @param invocationListener
+ * the invocationListener to set
*/
public void setInvocationListener(InvocationListener invocationListener) {
this.invocationListener = invocationListener;
@@ -376,26 +373,28 @@
*/
public InvocationHandler getInvocationHandler(final Object target) {
return new InvocationHandler() {
-
+
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
InvocationListener listener = getInvocationListener();
try {
Object result = method.invoke(target, args);
- if(null != listener){
- listener.afterInvoke(new InvocationEvent(target,method,args,result));
+ if (null != listener) {
+ listener.afterInvoke(new InvocationEvent(target,
+ method, args, result));
}
return result;
} catch (Throwable e) {
- if(null != listener){
- listener.processException(new InvocationErrorEvent(target,method,args,e));
+ if (null != listener) {
+ listener.processException(new InvocationErrorEvent(
+ target, method, args, e));
}
throw e;
}
}
-
+
};
-
+
}
public HttpSession getSession() {
@@ -407,10 +406,12 @@
this.session = new ServerHttpSession();
// Create proxy objects.
ClassLoader loader = Thread.currentThread().getContextClassLoader();
- if(null == loader){
+ if (null == loader) {
loader = this.getClass().getClassLoader();
}
- this.sessionProxy = (HttpSession) Proxy.newProxyInstance(loader, new
Class[]{HttpSession.class}, getInvocationHandler(session));
+ this.sessionProxy = (HttpSession) Proxy.newProxyInstance(loader,
+ new Class[] { HttpSession.class },
+ getInvocationHandler(session));
// inform session listeners.
final HttpSessionEvent event = new HttpSessionEvent(session);
fireEvent(SESSION_LISTENER_CLASS,
@@ -433,10 +434,14 @@
// Inform listeners
// Create proxy objects.
ClassLoader loader = Thread.currentThread().getContextClassLoader();
- if(null == loader){
+ if (null == loader) {
loader = this.getClass().getClassLoader();
}
- this.contextProxy = (ServletContext) Proxy.newProxyInstance(loader, new
Class[]{ServletContext.class}, getInvocationHandler(context));
+ this.contextProxy = (ServletContext) Proxy.newProxyInstance(loader,
+ new Class[] { ServletContext.class },
+ getInvocationHandler(context));
+ // Create default servlet
+ defaultServlet = new ServletContainer(null, new StaticServlet());
final ServletContextEvent event = new ServletContextEvent(context);
fireEvent(CONTEXT_LISTENER_CLASS,
new EventInvoker<ServletContextListener>() {
@@ -450,7 +455,6 @@
// init servlet
servlet.init(this.context);
}
- defaultServlet = new ServletContainer(null, new StaticServlet());
defaultServlet.init(getContext());
} catch (ServletException e) {
throw new TestException(e);
Added: trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/package.html
===================================================================
--- trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/package.html
(rev 0)
+++ trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/package.html 2008-11-19
01:04:10 UTC (rev 11229)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file
Property changes on:
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/package.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/staging/package.html
===================================================================
--- trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/staging/package.html
(rev 0)
+++
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/staging/package.html 2008-11-19
01:04:10 UTC (rev 11229)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file
Property changes on:
trunk/framework/jsf-test/src/main/javadoc/org/richfaces/test/staging/package.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/test-applications/ajaxTest/.metadata/src/main/webapp/WEB-INF/faces-config.pageflow
===================================================================
---
trunk/test-applications/ajaxTest/.metadata/src/main/webapp/WEB-INF/faces-config.pageflow
(rev 0)
+++
trunk/test-applications/ajaxTest/.metadata/src/main/webapp/WEB-INF/faces-config.pageflow 2008-11-19
01:04:10 UTC (rev 11229)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow:Pageflow
xmlns:pageflow="http://www.sybase.com/suade/pageflow"
id="pf12270500671790"
configfile="/ajaxTest/src/main/webapp/WEB-INF/faces-config.xml"/>
Modified: trunk/test-applications/ajaxTest/pom.xml
===================================================================
--- trunk/test-applications/ajaxTest/pom.xml 2008-11-18 22:44:40 UTC (rev 11228)
+++ trunk/test-applications/ajaxTest/pom.xml 2008-11-19 01:04:10 UTC (rev 11229)
@@ -5,7 +5,17 @@
<artifactId>ajaxTest</artifactId>
<name>ajax test</name>
<version>0.0.1-SNAPSHOT</version>
+ <packaging>war</packaging>
<build>
+ <testResources>
+ <testResource>
+ <directory>src/main/webapp</directory>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+ <finalName>ajaxTest</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -28,12 +38,44 @@
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>1.1.14</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
<version>3.3.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>jstl</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_10</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_10</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Deleted: trunk/test-applications/ajaxTest/src/main/java/Bean.java
===================================================================
--- trunk/test-applications/ajaxTest/src/main/java/Bean.java 2008-11-18 22:44:40 UTC (rev
11228)
+++ trunk/test-applications/ajaxTest/src/main/java/Bean.java 2008-11-19 01:04:10 UTC (rev
11229)
@@ -1,15 +0,0 @@
-
-
-import java.io.Serializable;
-
-public class Bean implements Serializable {
-
- private String text;
-
- public Bean() {}
-
- public String getText() { return text;}
-
- public void setText(String name) { this.text = name; }
-
-}
Copied: trunk/test-applications/ajaxTest/src/main/java/org/richfaces/Bean.java (from rev
11227, trunk/test-applications/ajaxTest/src/main/java/Bean.java)
===================================================================
--- trunk/test-applications/ajaxTest/src/main/java/org/richfaces/Bean.java
(rev 0)
+++ trunk/test-applications/ajaxTest/src/main/java/org/richfaces/Bean.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -0,0 +1,16 @@
+package org.richfaces;
+
+
+import java.io.Serializable;
+
+public class Bean implements Serializable {
+
+ private String text;
+
+ public Bean() {}
+
+ public String getText() { return text;}
+
+ public void setText(String name) { this.text = name; }
+
+}
Property changes on:
trunk/test-applications/ajaxTest/src/main/java/org/richfaces/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/ajaxTest/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/test-applications/ajaxTest/src/main/webapp/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/test-applications/ajaxTest/src/main/webapp/META-INF/MANIFEST.MF 2008-11-19
01:04:10 UTC (rev 11229)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on:
trunk/test-applications/ajaxTest/src/main/webapp/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/faces-config.xml (from
rev 11227, trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml)
===================================================================
--- trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/faces-config.xml 2008-11-19
01:04:10 UTC (rev 11229)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2"
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">
+
+ <application>
+ <!--
+ <message-bundle>messages</message-bundle>
+ -->
+ <locale-config>
+ <default-locale>en</default-locale>
+ </locale-config>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Property changes on:
trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/web.xml 2008-11-19 01:04:10
UTC (rev 11229)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+ <display-name>ajaxTest</display-name>
+ <description>ajax simple repeater test</description>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml (from rev 11227,
trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml)
===================================================================
--- trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml
(rev 0)
+++ trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml 2008-11-19 01:04:10
UTC (rev 11229)
@@ -0,0 +1,15 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html">
+ <head><title>Simple repeater in seam</title></head>
+ <body>
+ <h:form id="ajaxForm">
+ <h:inputText id="text" value="#{bean.text}">
+ <a4j:support reRender="out"
event="onclick"></a4j:support>
+ </h:inputText>
+ <h:outputText id="out"
value="#{bean.text}"></h:outputText>
+ </h:form>
+ </body>
+</html>
Property changes on: trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java
===================================================================
---
trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java 2008-11-18
22:44:40 UTC (rev 11228)
+++
trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java 2008-11-19
01:04:10 UTC (rev 11229)
@@ -27,11 +27,12 @@
@Override
protected void setupWebContent() {
- facesServer
- .addResource("/WEB-INF/faces-config.xml", "faces-config.xml");
- facesServer.addResource("/repeater.xhtml", "repeater.xhtml");
+ facesServer.addResourcesFromDirectory("/",
this.getClass().getResource("/repeater.xhtml"));
}
+// @Override
+// protected void setupSunFaces() {
+// }
/**
* @throws java.lang.Exception
*/
Deleted: trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml 2008-11-18
22:44:40 UTC (rev 11228)
+++ trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml 2008-11-19
01:04:10 UTC (rev 11229)
@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<faces-config version="1.2"
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">
-
- <application>
- <!--
- <message-bundle>messages</message-bundle>
- -->
- <locale-config>
- <default-locale>en</default-locale>
- </locale-config>
- <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
- </application>
- <managed-bean>
- <managed-bean-name>bean</managed-bean-name>
- <managed-bean-class>Bean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-</faces-config>
Deleted: trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml 2008-11-18 22:44:40
UTC (rev 11228)
+++ trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml 2008-11-19 01:04:10
UTC (rev 11229)
@@ -1,15 +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:a4j="http://richfaces.org/a4j"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:h="http://java.sun.com/jsf/html">
- <head><title>Simple repeater in seam</title></head>
- <body>
- <h:form id="ajaxForm">
- <h:inputText id="text" value="#{bean.text}">
- <a4j:support reRender="out"
event="onclick"></a4j:support>
- </h:inputText>
- <h:outputText id="out"
value="#{bean.text}"></h:outputText>
- </h:form>
- </body>
-</html>