Author: nbelaevski
Date: 2009-07-07 08:45:54 -0400 (Tue, 07 Jul 2009)
New Revision: 14807
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebXMLParser.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ResponseWriterContentHandler.java
Log:
Reintegrated community/3.3.x into JSF 2.0 branch
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebXMLParser.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebXMLParser.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebXMLParser.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.config;
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -71,7 +71,7 @@
private static final Log log = LogFactory.getLog(AjaxContext.class);
- Set<String> ajaxAreasToRender = new HashSet<String>();
+ Set<String> ajaxAreasToRender = new LinkedHashSet<String>();
Set<String> ajaxAreasToProcess = null;
@@ -100,7 +100,7 @@
public void release() {
- ajaxAreasToRender = new HashSet<String>();
+ ajaxAreasToRender = new LinkedHashSet<String>();
ajaxAreasToProcess = null;
@@ -331,8 +331,42 @@
ajaxAreasToRender.add(convertId(component, id));
}
}
+ // Is that component limit to list ?
+ if(Boolean.TRUE.equals(component.getAttributes().get("limitToList"))){
+ setLimitToList(true);
+ }
}
+ /**
+ * Add IDs of regions to process
+ *
+ * @see
org.ajax4jsf.context.AjaxContext#addAreasToProcessFromComponent(javax.faces.component.UIComponent)
+ */
+ @Override
+ public void addAreasToProcessFromComponent(FacesContext context, UIComponent component)
{
+ RendererUtils rendererUtils = RendererUtils.getInstance();
+
+ Set<String> areasToProcess = AjaxRendererUtils.getAjaxAreasToProcess(component);
+ if (areasToProcess != null) {
+ Set<String> convertedAreaIds = new HashSet<String>();
+
+ for (String areaId : areasToProcess) {
+ UIComponent areaComponent = rendererUtils.findComponentFor(component, areaId);
+ if (areaComponent != null) {
+ convertedAreaIds.add(areaComponent.getClientId(context));
+ } else {
+ convertedAreaIds.add(areaId);
+ }
+ }
+
+ if (this.ajaxAreasToProcess == null) {
+ this.ajaxAreasToProcess = convertedAreaIds;
+ } else {
+ this.ajaxAreasToProcess.addAll(convertedAreaIds);
+ }
+ }
+ }
+
public void addComponentToAjaxRender(UIComponent component) {
this.ajaxAreasToRender.add(AjaxRendererUtils.getAbsoluteId(component));
}
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ajax4jsf.context;
@@ -44,6 +61,7 @@
*/
public static final String
HANDLE_VIEW_EXPIRED_ON_CLIENT="org.ajax4jsf.handleViewExpiredOnClient";
+ public static final String[] DATATABLE_USES_VIEW_LOCALE =
{"org.richfaces.datatableUsesViewLocale"};
public static final boolean isSerializeServerState(FacesContext context) {
return getBoolean(context, SERIALIZE_SERVER_STATE, false);
@@ -69,6 +87,17 @@
AjaxStateManager.DEFAULT_NUMBER_OF_VIEWS);
}
+ /**
+ * Defines whether data table should use view root locale for sorting and filtering or
the
+ * default platform one
+ *
+ * @param context
+ * @return
+ */
+ public static boolean isDatatableUsesViewLocale(FacesContext context) {
+ return getBoolean(context, DATATABLE_USES_VIEW_LOCALE, false);
+ }
+
static int getInteger(FacesContext context, String[] paramNames,
int defaulValue) {
String initParameter = getInitParameter(context,paramNames);
Modified:
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ResponseWriterContentHandler.java
===================================================================
---
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ResponseWriterContentHandler.java 2009-07-07
12:32:38 UTC (rev 14806)
+++
branches/jsf2.0/framework/impl/src/main/java/org/ajax4jsf/context/ResponseWriterContentHandler.java 2009-07-07
12:45:54 UTC (rev 14807)
@@ -21,12 +21,15 @@
package org.ajax4jsf.context;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import javax.faces.FacesException;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
@@ -34,19 +37,28 @@
class ResponseWriterContentHandler implements ContentHandler {
- List<Object> events = new ArrayList<Object>();
-
private String linkClass;
+ private Node node;
+
public ResponseWriterContentHandler(String linkClass) {
super();
+
+ try {
+ Document document =
DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ node = document.createElement("head");
+ document.appendChild(node);
+ } catch (ParserConfigurationException e) {
+ throw new FacesException(e.getLocalizedMessage(), e);
+ }
+
this.linkClass = linkClass;
}
public void characters(char[] ch, int start, int length)
throws SAXException {
- events.add(new SAXTextEvent(new String(ch, start, length)));
+ node.appendChild(node.getOwnerDocument().createTextNode(new String(ch, start,
length)));
}
public void endDocument() throws SAXException {
@@ -54,7 +66,8 @@
public void endElement(String uri, String localName, String name)
throws SAXException {
- events.add(new SAXEndElementEvent(localName));
+
+ node = node.getParentNode();
}
public void endPrefixMapping(String prefix) throws SAXException {
@@ -84,23 +97,35 @@
public void startElement(String uri, String localName,
String name, Attributes atts) throws SAXException {
- Map<String, String> attsMap = new HashMap<String,
String>(atts.getLength());
+ Document document = node.getOwnerDocument();
+ Element element = document.createElement(localName);
+
int length = atts.getLength();
for (int i = 0; i < length; i++) {
- attsMap.put(atts.getLocalName(i), atts.getValue(i));
+ element.setAttribute(atts.getLocalName(i), atts.getValue(i));
}
if (HTML.LINK_ELEMENT.equals(localName)) {
- attsMap.put(HTML.class_ATTRIBUTE, linkClass);
+ element.setAttribute(HTML.class_ATTRIBUTE, linkClass);
}
-
- events.add(new SAXStartElementEvent(localName, attsMap));
+
+ node = node.appendChild(element);
}
public void startPrefixMapping(String prefix, String uri)
throws SAXException {
throw new UnsupportedOperationException();
}
+
+ public Node[] getNodes() {
+ NodeList childNodes = node.getChildNodes();
+ Node[] list = new Node[childNodes.getLength()];
+ for (int i = 0; i < list.length; i++) {
+ list[i] = childNodes.item(i);
+ }
+
+ return list;
+ }
}
\ No newline at end of file