Author: maksimkaszynski
Date: 2008-03-21 07:38:25 -0400 (Fri, 21 Mar 2008)
New Revision: 7040
Modified:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java
Log:
fixed TemplateEncoder
Modified:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
===================================================================
---
trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2008-03-21
11:38:14 UTC (rev 7039)
+++
trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2008-03-21
11:38:25 UTC (rev 7040)
@@ -55,6 +55,7 @@
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.resource.InternetResourceBuilder;
import org.ajax4jsf.tests.org.apache.shale.test.config.ConfigParser;
+import org.ajax4jsf.webapp.ConfigurableXMLFilter;
import org.ajax4jsf.webapp.WebXml;
import org.apache.shale.test.base.AbstractJsfTestCase;
import org.apache.shale.test.mock.MockApplication;
@@ -127,20 +128,12 @@
//e.printStackTrace();
//We cannot set private field
}
- /*
- * Don't know yet how to support enums
- *
- * expressionFactory = new
EnumSupportExpressionFactoryWrapper(application.getExpressionFactory());
- application = new MockApplication12() {
- @Override
- public ExpressionFactory getExpressionFactory() {
- return expressionFactory;
- }
- };
- facesContext.setApplication(application);
- */
+
// Setup FacesContext with necessary init parameters.
this.servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, getSkinName());
+
+
+
// setup VCP renderKit, create renderers.
RenderKitFactory vcpRenderKitFactory = (RenderKitFactory)
FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
vcpRenderKit = new ChameleonRenderKitImpl();
@@ -227,6 +220,9 @@
facesContext.setExternalContext(externalContext);
elContext = facesContext.getELContext();
expressionFactory = application.getExpressionFactory();
+
+
+
}
protected WebClient createWebClient() {
Modified:
trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java
===================================================================
---
trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java 2008-03-21
11:38:14 UTC (rev 7039)
+++
trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java 2008-03-21
11:38:25 UTC (rev 7040)
@@ -21,9 +21,15 @@
package org.richfaces.renderkit;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
+import javax.faces.context.FacesContext;
+import org.ajax4jsf.io.parser.FastHtmlParser;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.webapp.BaseXMLFilter;
+import org.ajax4jsf.webapp.HtmlParser;
+import org.ajax4jsf.webapp.ParserFacade;
/**
* Created 26.10.2007
@@ -43,10 +49,25 @@
TemplateEncoderRendererBase rendererBase = new TemplateEncoderRendererBase() {
@Override
- protected Class getComponentClass() {
+ protected Class<? extends UIComponent> getComponentClass() {
return UIOutput.class;
}
+ @Override
+ protected ParserFacade getParserFacade(FacesContext context) {
+ return new ParserFacade(context) {
+ @Override
+ protected HtmlParser getParser(FacesContext context,
+ BaseXMLFilter filter) {
+ return new FastHtmlParser();
+ }
+ @Override
+ protected void reuseParser() {
+
+ }
+ };
+ }
+
};
UIOutput output = new UIOutput();
Show replies by date