Hi,

there may be a point where myfaces does not comply with the JSF specification:

Chapter 9.4 of the spec says that the core actions must be independent of a 
particular RenderKit. This is not the case. I defined an empty document that 
contains only an <f:view> tag. The responce contains JavaScript code, which 
essentially only makes sense for an HTML-Renderer. This is an error, is it?

To me this is a problem, since I am experimenting with a client, that does not 
understand JavaScript, or even a <script> tag. 

Regards,

Andreas Schenk

My empty document:

<?xml version="1.0"?>
<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page";
        xmlns:f="http://java.sun.com/jsf/core";
        xmlns:h="http://java.sun.com/jsf/html";
        xmlns:t="http://myfaces.apache.org/tomahawk";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/JSP/Page                        
                        
http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd ">
<f:view>
</f:view>
</jsp:root>

The response:

<script type="text/javascript">
<!--
function getScrolling() {
    var x = 0; var y = 0;
    if (document.body && document.body.scrollLeft 
&& !isNaN(document.body.scrollLeft)) {
        x = document.body.scrollLeft;
    } else if (window.pageXOffset && !isNaN(window.pageXOffset)) {
        x = window.pageXOffset;
    }
    if (document.body && document.body.scrollTop 
&& !isNaN(document.body.scrollTop)) {
        y = document.body.scrollTop;
    } else if (window.pageYOffset && !isNaN(window.pageYOffset)) {
        y = window.pageYOffset;
    }
    return x + "," + y;
}
//-->
</script>

Reply via email to