-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
id attribute is missing in vdl of h:head and h:body #1760
Comments
For the record, this was the ticket wherein it was introduced #1100 and this was the associated commit javaee/mojarra@84332c3 It appears tag doc was only added to a file named And then we can see in the commit that only Mojarra's So the following adjustments need to be made:
|
- add back id attribute to VDL of h:head and h:body - fix HeadRenderer to only output it when actually specified - fix BodyRenderer to only output it when HTML5 doctype is used
… and h:body - fix HeadRenderer to only output it when actually specified - fix BodyRenderer to only output it when HTML5 doctype is used" This reverts commit ba403c1.
…f h:head and h:body - fix HeadRenderer to only output it when actually specified - fix BodyRenderer to only output it when HTML5 doctype is used"" This reverts commit baf7998.
Accidentally committed directly into master without PR, hence double revert via PR. |
Fix failing BodyRendererTest
HeadRenderer encodeBegin complexity was already removed since introduction of new Doctype interface, so it can now be tested
@tandraschko Can you point where this was implemented in MyFaces? I'm not seeing any ids rendered in RC1 when Doctype HTML 5 is used. |
@volosied can't remember |
@BalusC I'm seeing that the id attribute on the head element is no longer created on the namespacedView TCK app with 4.1? Is this intended? Edit: I'm just not seeing the scenario where id would be written on head /body? |
@volosied: id is only rendered when id is explicitly specified. Neither the original nor the new spec say anywhere that it should always be rendered even when unspecified. Is it causing problems in namespaced views? If so, then we probably need to take a second look there and redefine the spec to explicitly mention namespaced views (like as here and there done, ajax e.g.). |
Sorry I think I confused myself. I see what you mean now. However, I have a follow up question -- the ids should only be generated when HTML5 is specified, right? I think there might be a bug in Mojarra? I should not expect the ID to be generated in the facelet below; however, I still see the ids rendered. Could you double check yourself?
|
It's controllable by output mode not by doctype. See also recently added IT on this, this is controlled via Frankly I have no idea why exactly this is sone so, but the original impl did this since JSF 2.2. I believe this is because id attribute on head/body is unspecified/disallowed in HTML4 (even though XHTML1 and XML themselves allow "custom" attributes), but there is no dedicated output mode for HTML4 (obviously because it's not XML compatible). |
Observed in #1754
It was introduced in JSF 2.2 VDL as part of HTML5 work. But these attributes vanished in JSF 2.3 VDL.
The text was updated successfully, but these errors were encountered: