Received 'error@malformedXML' event from <input
sunfire Sep 26, 2012 4:42 PMI am currently porting a Seam 2.2 application to Seam 2.3 and during this process I also would like to upgrade Richfaces from 3.3.3 to 4.2.2. Now I have an issue that AJAX validation is not working anymore. At least the returned XML seems to be broken.
edit.xhtml decorator snippet
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.org/schema/seam/taglib"> <div class="entry"> <s:label id="inputLabel" styleClass="label #{invalid?'errors':''}"> <ui:insert name="label"/> <s:span id="RequiredStyle" styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="input #{invalid?'errors':''}"> <s:validateAll id="ValidateAll"> <ui:insert/> </s:validateAll> </span> <s:message id="message" styleClass="error errors" globalOnly="true"/> </div> </ui:composition>
jsf snippet
<s:decorate id="web8Decoration" template="edit.xhtml" rendered="#{webcollabCustomerHome.managed}"> <ui:define name="label">Web 8</ui:define> <h:inputText id="web8" size="2" maxlength="3" value="#{webcollabCustomerHome.instance.web8}" required="true"> <a4j:ajax event="blur" render="web8Decoration" bypassUpdates="true" execute="@this"/> </h:inputText> </s:decorate>
Now when I update the value of the input field I get this in the AJAX log:
debug[22:39:22.400]: New request added to queue. Queue requestGroupingId changed to ticket:web8Decoration:web8 debug[22:39:22.401]: Queue will wait 0ms before submit debug[22:39:22.402]: richfaces.queue: will submit request NOW info [22:39:22.404]: Received 'begin' event from <input id=ticket:web8Decoration:web8 ...> info [22:39:22.485]: Received 'beforedomupdate' event from <input id=ticket:web8Decoration:web8 ...> debug[22:39:22.487]: Server returned responseText: <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="ticket:web8Decoration"><![CDATA[ <div class="entry"><label id="ticket:web8Decoration:inputLabel" for="ticket:web8Decoration:web8" class="label errors"> Web 8<span id="ticket:web8Decoration:RequiredStyle" class="required">*</span></label> <span class="input errors"><input id="ticket:web8Decoration:web8" type="text" name="ticket:web8Decoration:web8" value="-1" maxlength="3" size="2" onblur="RichFaces.ajax(this,event,{"parameters":{"javax.faces.behavior.event":"blur","org.richfaces.ajax.component":"ticket:web8Decoration:web8"} ,"sourceId":this} )" /> </span><span id="ticket:web8Decoration:message" class="error errors">must be greater than or equal to 0</span> </div>]]></update><update id="javax.faces.ViewState"><![CDATA[-7210343971414420562:-7405273376949774702]]></update></changes></partial-response> info [22:39:22.490]: Listing content of response changes element: Element update for id=ticket:web8Decoration <update id="ticket:web8Decoration"><![CDATA[ <div class="entry"><label id="ticket:web8Decoration:inputLabel" for="ticket:web8Decoration:web8" class="label errors"> Web 8<span id="ticket:web8Decoration:RequiredStyle" class="required">*</span></label> <span class="input errors"><input id="ticket:web8Decoration:web8" type="text" name="ticket:web8Decoration:web8" value="-1" maxlength="3" size="2" onblur="RichFaces.ajax(this,event,{"parameters":{"javax.faces.behavior.event":"blur","org.richfaces.ajax.component":"ticket:web8Decoration:web8"} ,"sourceId":this} )" /> </span><span id="ticket:web8Decoration:message" class="error errors">must be greater than or equal to 0</span> </div>]]></update> Element update for id=javax.faces.ViewState <update id="javax.faces.ViewState"><![CDATA[-7210343971414420562:-7405273376949774702]]></update> debug[22:39:22.492]: richfaces.queue: ajax submit error debug[22:39:22.493]: richfaces.queue: Nothing to submit error[22:39:22.494]: Received 'error@malformedXML' event from <input id=ticket:web8Decoration:web8 ...> error[22:39:22.495]: [200] undefined: undefined
Any idea what would be causing this? It worked quite well in 3.3.3.
Thanks, Thorsten