|
| ||||||||||
| Tags: browser, html, jksf, root, script, url, w3c validator, xhtml, xml |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| JKsf and xhtml
I am having some issue and need to discuss a quick question, please hep me out to resolve issues : Do you have any method to make jsf render as valid xhtml (or, failing that, as valid html)? A frequent search on the google evaluated up nothing. Or is there another third party renderer that does the same ? Please help me out .. Thanks . |
|
#2
| ||||
| ||||
| Re: JKsf and xhtml
All of things are rendered by the Faces standard renderkit conforms to the below suggested XHTML practices:
|
|
#3
| |||
| |||
| Re: JKsf and xhtml
I have been moving via the supplied demonstration . Commonly , I quite need to drop the pages that I have generated within the w3c validator at the site , which is where this came up. If I occupy a page with otherwise validates as xhtml transitional and associate : <h:inputText id="y" value="#{Bean001.y}" validator="#{Bean001.validate}" /> I get out: <input id="helloForm:y" type="text" name="helloForm:y" value=""> Such type of tag is not closed, and so the validator ignores the page. I had a quick touch at the jsf code drop on the java.net website and (Although I haven't executed this ) that code does looks to close entire tags (method endElement in HtmlResponseWriter). The only different, very minor and thing that I have got the validator objecting to was not running with the 'type="XX"' attributes in <script> tags . |
|
#4
| |||
| |||
| Re: JKsf and xhtml
I am not convinced of the method of presenting "some XHTML practices" which is the default renderkit adheres to, as opposed to actually defining that it adheres to the standard. Specifically , JSF doesn't attempt to skip & (ampersand) characters that is generated into the attributes, in URLs - I have figured out that MyFaces does not perform this either. It could be received by alteration of the ResponseWriterImpl. I know that "proper" XML escaping could fine cause the final URLs to become undetectable within the non-XHTML-aware browsers, but I am disappointed there assumes as to be small discussion of this very necessary problem . |
|
#5
| |||
| |||
| Re: JKsf and xhtml
I am going to show you the ouput produced by the JSF which is actually doesn't assumes to be the valid XHTML , just take a look at the following code snippet : Code: <?xml version="1.0" encoding="UTF-8"?>
<jsp:root
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
session="false" />
<jsp:output doctype-public="-//W3C//DTD XHTML 1.1//EN"
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
doctype-root-element="html" omit-xml-declaration="false" />
<f:view>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>title</title></head>
<body>
<h:form><p>text</p></h:form>
</body></html>
</f:view>
</jsp:root> Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>title</title></head><body><form id="_id0" method="post" action="/index.faces;jsessionid=472A9F3A62261173DFFEB6046A0ECBD1" enctype="application/x-www-form-urlencoded"> <p>text</p><input type="hidden" name="_id0" value="_id0" /></form></body></html> |
|
#6
| ||||
| ||||
| Re: JKsf and xhtml
I have tried to consider about the exact same thing. When you refer the official W3C validator, <input> elements (including hidden ones) unable to move directly within a <form> element without being embedded according to the formatting components like <p>, <h3>, <td>. It will cause JSF pages to always got failed (slightly) validation. This is with Sun JSF 1.1_01. I am sure that it is not an error on my section. - Misunderstanding on Sun's section of XHTML specification. - Latest configuration to XHTML. - This is resolved in the latest versions of JSF (1.2) that Sun is working on that |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "JKsf and xhtml" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Don't know about the advantages of XHTML | Sarfaraj Khan | Software Development | 5 | 30-01-2010 12:43 PM |
| How to Host an XHTML Website with a FTP? | hatred | Software Development | 5 | 06-01-2010 06:49 PM |
| Difference between dhtml, xhtml and xml | Sacchidananda | Software Development | 3 | 16-11-2009 06:44 AM |
| How to use List in XHTML | Gyan Guru | Guides & Tutorials | 2 | 03-07-2009 02:14 PM |
| Differences between XHTML and PHP | JTD | Software Development | 1 | 22-11-2008 01:42 PM |