Author: alexsmirnov
Date: 2007-06-27 18:59:21 -0400 (Wed, 27 Jun 2007)
New Revision: 287
Added:
trunk/framework/src/test/java/org/ajax4jsf/framework/ajax/
trunk/framework/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/
trunk/framework/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/
trunk/framework/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java
Modified:
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java
trunk/framework/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml
trunk/samples/pom.xml
trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml
trunk/samples/useCases/src/main/webapp/index.jsp
trunk/samples/useCases/src/main/webapp/pages/controls.xhtml
Log:
Resolved AJSF-88
Setup sample portlet application for a Jboss 2.6 / JSF 1.2
Modified:
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java
===================================================================
---
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java 2007-06-27
18:40:50 UTC (rev 286)
+++
trunk/framework/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilter.java 2007-06-27
22:59:21 UTC (rev 287)
@@ -26,6 +26,8 @@
import org.apache.xerces.xni.QName;
import org.apache.xerces.xni.XMLAttributes;
import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLComponentManager;
+import org.apache.xerces.xni.parser.XMLConfigurationException;
import org.cyberneko.html.HTMLAugmentations;
import org.cyberneko.html.filters.DefaultFilter;
@@ -46,6 +48,12 @@
super();
_state = new BaseHtmlCorrectionState(null);
}
+
+ public void reset(XMLComponentManager componentManager)
+ throws XMLConfigurationException {
+ super.reset(componentManager);
+ _state = new BaseHtmlCorrectionState(null);
+ }
/* (non-Javadoc)
* @see org.cyberneko.html.filters.DefaultFilter#endElement(org.apache.xerces.xni.QName,
org.apache.xerces.xni.Augmentations)
@@ -63,17 +71,28 @@
super.startElement(element, attributes, augs);
}
- void insertStartElement(String name) {
- QName element = new QName(null,name,name,null);
+ void insertStartElement(String name, QName base) {
+ QName element = createQName(name, base);
XMLAttributes attrs = new XMLAttributesImpl();
Augmentations augs = new HTMLAugmentations();
super.startElement(element,attrs,augs);
}
+
+ /**
+ * @param name
+ * @param base
+ * @return
+ */
+ private QName createQName(String name, QName base) {
+ String prefix = base.prefix;
+ String rawname = null != prefix && (!"".equals(prefix))?
prefix+':'+name:name;
+ QName element = new QName(prefix,name,rawname,base.uri);
+ return element;
+ }
- void insertEndElement(String name) {
- QName element = new QName(null,name,name,null);
-// XMLAttributes attrs = new XMLAttributesImpl();
+ void insertEndElement(String name, QName base) {
+ QName element = createQName(name, base);
Augmentations augs = new HTMLAugmentations();
super.endElement(element,augs);
}
@@ -99,8 +118,9 @@
public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
throws XNIException {
if(element.rawname.equalsIgnoreCase("table")){
_state = new TableHtmlCorrectionState(this);
+ } else {
+ depth++;
}
- depth++;
}
@@ -120,7 +140,7 @@
public void endElement(QName element, Augmentations augs) throws XNIException {
if (inTbody) {
- insertEndElement("tbody");
+ insertEndElement("tbody", element);
}
_state = previsiosState;
}
@@ -129,11 +149,11 @@
if(element.rawname.equalsIgnoreCase("tr")){
if(!inTbody){
inTbody = true;
- insertStartElement("tbody");
+ insertStartElement("tbody", element);
}
} else {
if (inTbody) {
- insertEndElement("tbody");
+ insertEndElement("tbody", element);
inTbody = false;
}
}
Added:
trunk/framework/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java
===================================================================
---
trunk/framework/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java
(rev 0)
+++
trunk/framework/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/nekko/HtmlCorrectionFilterTestCase.java 2007-06-27
22:59:21 UTC (rev 287)
@@ -0,0 +1,447 @@
+/**
+ *
+ */
+package org.ajax4jsf.framework.ajax.xmlfilter.nekko;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.xerces.util.XMLAttributesImpl;
+import org.apache.xerces.xni.Augmentations;
+import org.apache.xerces.xni.NamespaceContext;
+import org.apache.xerces.xni.QName;
+import org.apache.xerces.xni.XMLAttributes;
+import org.apache.xerces.xni.XMLDocumentFragmentHandler;
+import org.apache.xerces.xni.XMLDocumentHandler;
+import org.apache.xerces.xni.XMLLocator;
+import org.apache.xerces.xni.XMLResourceIdentifier;
+import org.apache.xerces.xni.XMLString;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLDocumentSource;
+import org.cyberneko.html.HTMLAugmentations;
+
+import junit.framework.TestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class HtmlCorrectionFilterTestCase extends TestCase {
+
+ private List elements;
+ private HtmlCorrectionFilter filter;
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ elements = new ArrayList();
+ filter = new HtmlCorrectionFilter();
+ filter.setDocumentHandler(new TestHandler());
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ elements = null;
+ filter = null;
+ super.tearDown();
+ }
+
+ private void startElement(String name){
+ QName element = new QName(null,name,name,null);
+ XMLAttributes attrs = new XMLAttributesImpl();
+ Augmentations augs = new HTMLAugmentations();
+ filter.startElement(element, attrs, augs);
+ }
+
+ private void endElement(String name){
+ QName element = new QName(null,name,name,null);
+ Augmentations augs = new HTMLAugmentations();
+ filter.endElement(element, augs);
+ }
+
+ private void emptyElement(String name){
+ QName element = new QName(null,name,name,null);
+ XMLAttributes attrs = new XMLAttributesImpl();
+ Augmentations augs = new HTMLAugmentations();
+ filter.emptyElement(element, attrs, augs);
+ }
+
+
+ private void executeSequence(El[] seq){
+ for (int i=0; i<seq.length;i++) {
+ El element = seq[i];
+ switch (element.type) {
+ case XNIElement.EMPTY:
+ emptyElement(element.name);
+ break;
+ case XNIElement.START:
+ startElement(element.name);
+ break;
+ case XNIElement.END:
+ endElement(element.name);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+
+ private void assertSequence(El[] seq){
+ for (int i = 0; i < seq.length; i++) {
+ assertFalse("Record less elements then expected",i>=elements.size());
+ El element = (El) seq[i];
+ XNIElement rec = (XNIElement) elements.get(i);
+ assertEquals("at position "+i,element.type, rec.type);
+ assertEquals("at position "+i,element.name, rec.element.localpart);
+ }
+ }
+ /**
+ * Test method for {@link
org.ajax4jsf.framework.ajax.xmlfilter.nekko.HtmlCorrectionFilter#endElement(org.apache.xerces.xni.QName,
org.apache.xerces.xni.Augmentations)}.
+ */
+ public void testEndElementQNameAugmentations() {
+ startElement("html");//0
+ startElement("body");
+ startElement("table");// 2
+ emptyElement("thead");
+ startElement("tbody"); //4
+ startElement("tr");
+ startElement("td");//6
+ endElement("td");
+ endElement("tr");//8
+ endElement("tbody");
+ endElement("table");//10
+ endElement("body");
+ endElement("html");//12
+ endElement("html");//overflow ?
+
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(0)).type);
+ assertEquals("html", ((XNIElement)elements.get(0)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(1)).type);
+ assertEquals("body", ((XNIElement)elements.get(1)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(2)).type);
+ assertEquals("table", ((XNIElement)elements.get(2)).element.rawname);
+ assertEquals(XNIElement.EMPTY, ((XNIElement)elements.get(3)).type);
+ assertEquals("thead", ((XNIElement)elements.get(3)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(4)).type);
+ assertEquals("tbody", ((XNIElement)elements.get(4)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(5)).type);
+ assertEquals("tr", ((XNIElement)elements.get(5)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(6)).type);
+ assertEquals("td", ((XNIElement)elements.get(6)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(7)).type);
+ assertEquals("td", ((XNIElement)elements.get(7)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(8)).type);
+ assertEquals("tr", ((XNIElement)elements.get(8)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(9)).type);
+ assertEquals("tbody", ((XNIElement)elements.get(9)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(10)).type);
+ assertEquals("table", ((XNIElement)elements.get(10)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(11)).type);
+ assertEquals("body", ((XNIElement)elements.get(11)).element.rawname);
+ }
+
+ public void testInsertTbody() {
+ startElement("html");//0
+ startElement("body");
+ startElement("table");// 2
+ emptyElement("thead");
+// startElement("tbody"); //4
+ startElement("tr");
+ startElement("td");//6
+ endElement("td");
+ endElement("tr");//8
+// endElement("tbody");
+ endElement("table");//10
+ endElement("body");
+ endElement("html");//12
+ endElement("html");//overflow ?
+
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(0)).type);
+ assertEquals("html", ((XNIElement)elements.get(0)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(1)).type);
+ assertEquals("body", ((XNIElement)elements.get(1)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(2)).type);
+ assertEquals("table", ((XNIElement)elements.get(2)).element.rawname);
+ assertEquals(XNIElement.EMPTY, ((XNIElement)elements.get(3)).type);
+ assertEquals("thead", ((XNIElement)elements.get(3)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(4)).type);
+ assertEquals("tbody", ((XNIElement)elements.get(4)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(5)).type);
+ assertEquals("tr", ((XNIElement)elements.get(5)).element.rawname);
+ assertEquals(XNIElement.START, ((XNIElement)elements.get(6)).type);
+ assertEquals("td", ((XNIElement)elements.get(6)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(7)).type);
+ assertEquals("td", ((XNIElement)elements.get(7)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(8)).type);
+ assertEquals("tr", ((XNIElement)elements.get(8)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(9)).type);
+ assertEquals("tbody", ((XNIElement)elements.get(9)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(10)).type);
+ assertEquals("table", ((XNIElement)elements.get(10)).element.rawname);
+ assertEquals(XNIElement.END, ((XNIElement)elements.get(11)).type);
+ assertEquals("body", ((XNIElement)elements.get(11)).element.rawname);
+ }
+
+
+ public void testEnclosedTables() throws Exception {
+ El[] exec = {
+ new El("html",1),
+ new El("table",1),
+ new El("tbody",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("table",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("td",2),
+ new El("tr",2),
+ new El("table",2),
+ new El("td",2),
+ new El("tr",2),
+ new El("tbody",2),
+ new El("table",2),
+ new El("html",2)
+ };
+ executeSequence(exec);
+ El[] expect = {
+ new El("html",1),
+ new El("table",1),
+ new El("tbody",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("table",1),
+ new El("tbody",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("td",2),
+ new El("tr",2),
+ new El("tbody",2),
+ new El("table",2),
+ new El("td",2),
+ new El("tr",2),
+ new El("tbody",2),
+ new El("table",2),
+ new El("html",2)
+ };
+ assertSequence(expect);
+ }
+
+ public void testEnclosedTwoTables() throws Exception {
+ El[] exec = {
+ new El("html",1),
+ new El("table",1),
+ new El("tbody",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("table",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("table",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("td",2),
+ new El("tr",2),
+ new El("table",2),
+ new El("td",2),
+ new El("tr",2),
+ new El("table",2),
+ new El("td",2),
+ new El("tr",2),
+ new El("tbody",2),
+ new El("table",2),
+ new El("html",2)
+ };
+ executeSequence(exec);
+ El[] expect = {
+ new El("html",1),
+ new El("table",1),
+ new El("tbody",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("table",1),
+ new El("tbody",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("table",1),
+ new El("tbody",1),
+ new El("tr",1),
+ new El("td",1),
+ new El("td",2),
+ new El("tr",2),
+ new El("tbody",2),
+ new El("table",2),
+ new El("td",2),
+ new El("tr",2),
+ new El("tbody",2),
+ new El("table",2),
+ new El("td",2),
+ new El("tr",2),
+ new El("tbody",2),
+ new El("table",2),
+ new El("html",2)
+ };
+ assertSequence(expect);
+ }
+ /**
+ * Test method for {@link
org.ajax4jsf.framework.ajax.xmlfilter.nekko.HtmlCorrectionFilter#startElement(org.apache.xerces.xni.QName,
org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)}.
+ */
+// public void testResVoid() {
+// fail("Not yet implemented");
+// }
+
+ private class TestHandler implements XMLDocumentHandler{
+
+ public void characters(XMLString text, Augmentations augmentations)
+ throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void comment(XMLString text, Augmentations augmentations)
+ throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void emptyElement(QName element, XMLAttributes attributes,
+ Augmentations augmentations) throws XNIException {
+ elements.add(new XNIElement(element,XNIElement.EMPTY));
+
+ }
+
+ public void endCDATA(Augmentations augmentations) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void endDocumentFragment(Augmentations augmentations)
+ throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void endElement(QName element, Augmentations augmentations)
+ throws XNIException {
+ elements.add(new XNIElement(element,XNIElement.END));
+
+ }
+
+ public void endGeneralEntity(String name, Augmentations augmentations)
+ throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void ignorableWhitespace(XMLString text,
+ Augmentations augmentations) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void processingInstruction(String target, XMLString data,
+ Augmentations augmentations) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void startCDATA(Augmentations augmentations) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void startDocumentFragment(XMLLocator locator,
+ NamespaceContext namespaceContext, Augmentations augmentations)
+ throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void startElement(QName element, XMLAttributes attributes,
+ Augmentations augmentations) throws XNIException {
+ elements.add(new XNIElement(element,XNIElement.START));
+
+ }
+
+ public void startGeneralEntity(String name,
+ XMLResourceIdentifier identifier, String encoding,
+ Augmentations augmentations) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void textDecl(String version, String encoding,
+ Augmentations augmentations) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void doctypeDecl(String rootElement, String publicId,
+ String systemId, Augmentations augs) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void endDocument(Augmentations augs) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public XMLDocumentSource getDocumentSource() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setDocumentSource(XMLDocumentSource source) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void startDocument(XMLLocator locator, String encoding,
+ NamespaceContext namespaceContext, Augmentations augs)
+ throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void xmlDecl(String version, String encoding, String standalone,
+ Augmentations augs) throws XNIException {
+ // TODO Auto-generated method stub
+
+ }
+
+ }
+
+ private static class XNIElement {
+ static final int EMPTY=0;
+ static final int START=1;
+ static final int END=2;
+ QName element;
+ int type;
+ public XNIElement(QName element, int type) {
+ super();
+ this.element = element;
+ this.type = type;
+ }
+
+ }
+
+ private static class El{
+ String name;
+ int type;
+ /**
+ * @param name
+ * @param type
+ */
+ public El(String name, int type) {
+ this.name = name;
+ this.type = type;
+ }
+
+ }
+}
Modified:
trunk/framework/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java
===================================================================
---
trunk/framework/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java 2007-06-27
18:40:50 UTC (rev 286)
+++
trunk/framework/src/test/java/org/ajax4jsf/framework/util/javascript/ScriptUtilsTest.java 2007-06-27
22:59:21 UTC (rev 287)
@@ -23,9 +23,8 @@
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
@@ -138,7 +137,7 @@
public void testTwoDimentionalStringArrayToScript() {
String[][] obj =
{{"one","two"},{"three","four"}};
assertEquals("[['one','two'] ,['three','four'] ]
", ScriptUtils.toScript(obj));
- HashMap map = new HashMap();
+ Map map = new TreeMap();
map.put("a", obj);
map.put("b", "c");
assertEquals("{'a':[['one','two']
,['three','four'] ] ,'b':'c'} ",
ScriptUtils.toScript(map));
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml 2007-06-27
18:40:50 UTC (rev 286)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml 2007-06-27
22:59:21 UTC (rev 287)
@@ -8,28 +8,30 @@
<component-ref>ajaxPortletApp.ajaxPortlet</component-ref>
</instance>
</deployment>
+ <!--
+ <deployment>
+ <parent-ref>default</parent-ref>
+ <if-exists>overwrite</if-exists>
+ <page>
+ <page-name>ajaxPortlet</page-name>
+ <window>
+ <window-name>ajaxportletWindow</window-name>
+ <instance-ref>AjaxPortletInstance</instance-ref>
+ <default>true</default>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>ajaxportletSecondWindow</window-name>
+ <instance-ref>AjaxPortletSecondInstance</instance-ref>
+ <default>true</default>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ </page>
+ </deployment>
+ -->
<deployment>
- <parent-ref>default</parent-ref>
- <if-exists>overwrite</if-exists>
- <page>
- <page-name>ajaxPortlet</page-name>
- <window>
- <window-name>ajaxportletWindow</window-name>
- <instance-ref>AjaxPortletInstance</instance-ref>
- <default>true</default>
- <region>center</region>
- <height>0</height>
- </window>
- <window>
- <window-name>ajaxportletSecondWindow</window-name>
- <instance-ref>AjaxPortletSecondInstance</instance-ref>
- <default>true</default>
- <region>center</region>
- <height>0</height>
- </window>
- </page>
- </deployment>
- <deployment>
<if-exists>overwrite</if-exists>
<parent-ref>default.default</parent-ref>
<window>
@@ -39,7 +41,7 @@
<region>center</region>
<height>0</height>
</window>
- </deployment>
+ </deployment><!--
<deployment>
<parent-ref>default</parent-ref>
<if-exists>overwrite</if-exists>
@@ -48,4 +50,4 @@
<component-ref>ajaxPortletApp.ajaxPortlet</component-ref>
</instance>
</deployment>
-</deployments>
+--></deployments>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml 2007-06-27
18:40:50 UTC (rev 286)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml 2007-06-27
22:59:21 UTC (rev 287)
@@ -1,4 +1,8 @@
-<portlet-app>
+<?xml version="1.0"?>
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+
"http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd"><portlet-app>
<portlet>
<portlet-name>ajaxPortlet</portlet-name>
</portlet>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml 2007-06-27 18:40:50 UTC (rev
286)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/web.xml 2007-06-27 22:59:21 UTC (rev
287)
@@ -85,9 +85,11 @@
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
- <listener>
-
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
- </listener>
+ <!--
+ <listener>
+
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ </listener>
+ -->
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-06-27 18:40:50 UTC (rev 286)
+++ trunk/samples/pom.xml 2007-06-27 22:59:21 UTC (rev 287)
@@ -84,6 +84,12 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <version>0.9.5</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.0</version>
@@ -135,7 +141,7 @@
<profile>
<id>jsf1_2</id>
<properties>
- <jsfVersion>1.2_04</jsfVersion>
+ <jsfVersion>1.2_04-p02</jsfVersion>
</properties>
<build>
<defaultGoal>jetty:run</defaultGoal>
Modified: trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml 2007-06-27 18:40:50 UTC (rev
286)
+++ trunk/samples/useCases/src/main/webapp/WEB-INF/web.xml 2007-06-27 22:59:21 UTC (rev
287)
@@ -39,7 +39,7 @@
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
+ <filter-class>org.ajax4jsf.FastFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/samples/useCases/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/useCases/src/main/webapp/index.jsp 2007-06-27 18:40:50 UTC (rev 286)
+++ trunk/samples/useCases/src/main/webapp/index.jsp 2007-06-27 22:59:21 UTC (rev 287)
@@ -5,7 +5,7 @@
<head></head>
<body>
- <jsp:forward page="/faces/pages/index.jsp" />
+ <jsp:forward page="/faces/pages/index.jsf" />
</body>
</html>
\ No newline at end of file
Modified: trunk/samples/useCases/src/main/webapp/pages/controls.xhtml
===================================================================
--- trunk/samples/useCases/src/main/webapp/pages/controls.xhtml 2007-06-27 18:40:50 UTC
(rev 286)
+++ trunk/samples/useCases/src/main/webapp/pages/controls.xhtml 2007-06-27 22:59:21 UTC
(rev 287)
@@ -20,14 +20,14 @@
value="#{dataManager.selectedCompany.desc}"
action="#{dataManager.commandAction}"
actionListener="#{dataManager.commandActionListener}"
- reRender="selectPanel" />
+ reRender="selectPanel,selectTable" />
</a4j:outputPanel> <a4j:outputPanel id="agencyOutputPanel"
layout="inline"
styleClass="linePanel">
<a4j:commandLink id="agencyCommandLink"
value="#{dataManager.selectedAgency.desc}"
action="#{dataManager.commandAction}"
actionListener="#{dataManager.commandActionListener}"
- reRender="selectPanel" />
+ reRender="selectPanel,selectTable" />
</a4j:outputPanel></div>
</div>
<a4j:outputPanel id="selectPanel" layout="block"
@@ -43,7 +43,16 @@
style="display:block" />
</a4j:repeat>
</a4j:outputPanel>
+ <br />
+ <h:dataTable id="selectTable"
+ value="#{dataManager.selectData}" var="item"
+ >
+ <h:column>
+ <h:outputText value="#{item.desc}"/>
+ </h:column>
+ </h:dataTable>
</a4j:form>
+ <a4j:log hotkey="M"/>
</body>
</f:view>
</html>