users@jsf-extensions.java.net

problem with Facelets

From: Kenneth Suter <Kenneth.Suter_at_Sun.COM>
Date: Thu, 24 Jan 2008 16:53:40 -0600

Hello,

I am trying to get AJAX validation calls to work using jsf-extensions
0.1 rc5, Woodstock 4.2, and Facelets 1.1.13. I have seen some recent
discussions regarding problems with Facelets and DynaFaces so if these
problems are due to known issues let me know.

In the browser, after the response from the AJAX call is returned an
error appears in the JavaScript console for com_sun_faces_ajax-max.js
line 923: 'components has no properties'. The context of this error is
the following in prototype.js:

renderView: function(xjson) {
912 var xml = this.transport.responseXML;
913 var id, content, markup, str;
914 if (null == xml || typeof xml == 'undefined') {
915 // If the content contains javaScript, just execute it
916 markup = this.transport.responseText;
917 if (null != markup && typeof markup != 'undefined') {
918 markup.evalScripts();
919 }
920 return;
921 }
922 var components = xml.getElementsByTagName('components')[0];
923 var render = components.getElementsByTagName('render');
...

In this case, the transport value contains a
'this.transport.responseText' of:

<partial-response><components><render
id="profile_form:ContentPageTitleProfile:PropertySheetProfile:SectionAccountAttributes:PropertyEmailAddress:TextFieldEmailAddress"><markup><![CDATA[{"valid":true,"id":"profile_form:ContentPageTitleProfile:PropertySheetProfile:SectionAccountAttributes:PropertyEmailAddress:TextFieldEmailAddress"}]]></markup></render></components><partial-response><components><render
id="profile_form:ContentPageTitleProfile:PropertySheetProfile:SectionAccountAttributes:PropertyEmailAddress:TextFieldEmailAddress"><markup><![CDATA[{"valid":true,"id":"profile_form:ContentPageTitleProfile:PropertySheetProfile:SectionAccountAttributes:PropertyEmailAddress:TextFieldEmailAddress"}]]></markup></render></components>


but the 'this.transport.responseXML' contains a parsererror:

XML Parsing Error: no element found
Location: http://localhost:8080/idm/faces/profile.xhtml
Line Number 1, Column 735:

So I suppose the XML returned by the request is distasteful somehow (the
![CDATA[?) to the parser. Any help would be appreciated.

-Kenneth