|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
problem with FaceletsHello,
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 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: problem with FaceletsNever mind I think I have found my problem. I needed to specify the
LIFECYCLE_ID as PARTIAL in my web.xml: |<servlet>| | <servlet-name>Faces Servlet</servlet-name>| | <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>| | <init-param>| | <param-name>javax.faces.LIFECYCLE_ID</param-name>| | <param-value>com.sun.faces.lifecycle.PARTIAL</param-value>| | </init-param>| | <load-on-startup>1</load-on-startup>| |</servlet>| as is specified in: https://woodstock.dev.java.net/docs/specs/ajax-architecture-example.html -Kenneth Kenneth Suter wrote: > 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free Forum Powered by Nabble | Forum Help |