You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/04/18 19:16:06 UTC

[jira] [Resolved] (WICKET-1856) AbstractTree XHTML Strict validation

     [ https://issues.apache.org/jira/browse/WICKET-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-1856.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC4

Improved in r1094661.
Since it is not something important - it is improved only in 1.5.x.

> AbstractTree XHTML Strict validation
> ------------------------------------
>
>                 Key: WICKET-1856
>                 URL: https://issues.apache.org/jira/browse/WICKET-1856
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>            Assignee: Martin Grigorov
>            Priority: Trivial
>             Fix For: 1.5-RC4
>
>
> [Notice: Adapted from http://markmail.org/message/afuxccwazkzwc7bz ]
> I have a rootless BaseTree and see it output
>  <table style="display:none" id="tree1f_0"></table><table class="wicket-tree-content" id="tree1f_1"><tr>...
> which according to http://validator.w3.org is invalid strict XHTML. Looking at the
> comment in the code, AbstractTree.onRender(),
> 			// is this root and tree is in rootless mode?
> 			if (this == rootItem && isRootLess() == true)
> 			{
> 				// yes, write empty div with id
> 				// this is necessary for createElement js to work correctly
> 				String tagName = ((ComponentTag)markupStream.get()).getName();
> 				getResponse().write(
> 					"<" + tagName + " style=\"display:none\" id=\"" + getMarkupId() + "\"></" +
> 						tagName + ">");
> 				markupStream.skipComponent();
> 			}
> it appears from the comment that the indention was to output a div and not a table. With
> a div, we would get valid markup:
>  <div style="display:none" id="tree1f_0"></div><table class="wicket-tree-content" id="tree1f_1"><tr>...
> Is there a particular reason to fetch the tagName from the markupStream instead of just hardcoding
> it to "div"?
> Thanks,
> Kaspar

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira