Author: alexsmirnov
Date: 2008-04-17 20:46:34 -0400 (Thu, 17 Apr 2008)
New Revision: 7913
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java
trunk/ui/core/src/main/config/component/commandButton.xml
trunk/ui/core/src/main/config/component/commandLink.xml
trunk/ui/core/src/main/config/component/support.xml
Log:
Fix issues:
http://jira.jboss.com/jira/browse/RF-3130
http://jira.jboss.com/jira/browse/AJSF-129
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java 2008-04-17
23:19:00 UTC (rev 7912)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToStream.java 2008-04-18
00:46:34 UTC (rev 7913)
@@ -229,20 +229,22 @@
try
{
- TreeWalker walker =
- new TreeWalker(this);
-
- walker.traverse(node);
- }
- catch (org.xml.sax.SAXException se)
- {
- throw new WrappedRuntimeException(se);
- }
+ TreeWalker walker = new TreeWalker(this);
+ // FIX for
http://jira.jboss.com/jira/browse/AJSF-129
+ if (m_needToCallStartDocument) {
+ walker.traverse(node);
+ } else {
+ // Serialise without start/endDocument calls.
+ walker.traverseFragment(node);
+ }
+ } catch (org.xml.sax.SAXException se) {
+ throw new WrappedRuntimeException(se);
+ }
}
/**
- * Taken from XSLTC
- */
+ * Taken from XSLTC
+ */
private boolean m_escaping = true;
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java 2008-04-17
23:19:00 UTC (rev 7912)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/TreeWalker.java 2008-04-18
00:46:34 UTC (rev 7913)
@@ -54,6 +54,7 @@
import org.w3c.dom.Text;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;
import org.xml.sax.helpers.LocatorImpl;
@@ -158,8 +159,17 @@
this.m_contentHandler.startDocument();
- Node top = pos;
+ traverseFragment(pos);
+ this.m_contentHandler.endDocument();
+ }
+/**
+ * @param pos
+ * @throws SAXException
+ */
+public void traverseFragment(Node pos) throws SAXException {
+ Node top = pos;
+
while (null != pos)
{
startNode(pos);
@@ -193,8 +203,7 @@
pos = nextNode;
}
- this.m_contentHandler.endDocument();
- }
+}
/**
* Perform a pre-order traversal non-recursive style.
Modified: trunk/ui/core/src/main/config/component/commandButton.xml
===================================================================
--- trunk/ui/core/src/main/config/component/commandButton.xml 2008-04-17 23:19:00 UTC (rev
7912)
+++ trunk/ui/core/src/main/config/component/commandButton.xml 2008-04-18 00:46:34 UTC (rev
7913)
@@ -107,5 +107,10 @@
<classname>int</classname>
<description>Timeout ( in ms ) for request.</description>
</property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>If true, disable this component on page.</description>
+ </property>
</component>
</components>
\ No newline at end of file
Modified: trunk/ui/core/src/main/config/component/commandLink.xml
===================================================================
--- trunk/ui/core/src/main/config/component/commandLink.xml 2008-04-17 23:19:00 UTC (rev
7912)
+++ trunk/ui/core/src/main/config/component/commandLink.xml 2008-04-18 00:46:34 UTC (rev
7913)
@@ -88,5 +88,10 @@
<classname>int</classname>
<description>Timeout ( in ms ) for request.</description>
</property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>If true, disable this component on page.</description>
+ </property>
</component>
</components>
\ No newline at end of file
Modified: trunk/ui/core/src/main/config/component/support.xml
===================================================================
--- trunk/ui/core/src/main/config/component/support.xml 2008-04-17 23:19:00 UTC (rev
7912)
+++ trunk/ui/core/src/main/config/component/support.xml 2008-04-18 00:46:34 UTC (rev
7913)
@@ -127,6 +127,11 @@
<classname>int</classname>
<description>Timeout (in ms) for request</description>
</property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>If true, disable this component on page.</description>
+ </property>
</component>