You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kaspar Fischer (JIRA)" <ji...@apache.org> on 2008/10/02 22:13:44 UTC

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

AbstractTree XHTML Strict validation
------------------------------------

                 Key: WICKET-1856
                 URL: https://issues.apache.org/jira/browse/WICKET-1856
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4-M2
            Reporter: Kaspar Fischer


[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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Kaspar Fischer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717859#action_12717859 ] 

Kaspar Fischer commented on WICKET-1856:
----------------------------------------

Yep, the problem is that the element is empty:

  end tag for "table" which is not finished

It seems your suggestion to output <tr><td></td></tr> in between would fix this then.

Thanks, Kaspar

> AbstractTree XHTML Strict validation
> ------------------------------------
>
>                 Key: WICKET-1856
>                 URL: https://issues.apache.org/jira/browse/WICKET-1856
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>            Assignee: Matej Knopp
>            Priority: Trivial
>
> [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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Stanislav Dvorscak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762157#action_12762157 ] 

Stanislav Dvorscak commented on WICKET-1856:
--------------------------------------------

The same problem is with the DataTable. It will be perfect, if you have always in the tbody <tr style="display: none"><td></td></tr> or something like this. It is necessary only because of W3C validation. I know it is crazy, but the second possibility is only to change the DTD declaration of XHTML, and I don't know if it is more easy :)

> AbstractTree XHTML Strict validation
> ------------------------------------
>
>                 Key: WICKET-1856
>                 URL: https://issues.apache.org/jira/browse/WICKET-1856
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>            Assignee: Matej Knopp
>            Priority: Trivial
>
> [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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-1856:
-------------------------------------

    Assignee: Matej Knopp

> AbstractTree XHTML Strict validation
> ------------------------------------
>
>                 Key: WICKET-1856
>                 URL: https://issues.apache.org/jira/browse/WICKET-1856
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>            Assignee: Matej Knopp
>            Priority: Trivial
>
> [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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Kaspar Fischer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kaspar Fischer updated WICKET-1856:
-----------------------------------

    Priority: Trivial  (was: Major)

> AbstractTree XHTML Strict validation
> ------------------------------------
>
>                 Key: WICKET-1856
>                 URL: https://issues.apache.org/jira/browse/WICKET-1856
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>            Priority: Trivial
>
> [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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702899#action_12702899 ] 

Matej Knopp commented on WICKET-1856:
-------------------------------------

I don't really remember why it gets the tag from stream but I know there was a good reason to do it because it used to output only a div. IIRC there were some problems in IE with replacing the elements afterwards. What exactly is the validation problem? Is it  because the element is empty? We could fix it by rendering <tr><td></td></tr> or something like that if the tag name is table.

> AbstractTree XHTML Strict validation
> ------------------------------------
>
>                 Key: WICKET-1856
>                 URL: https://issues.apache.org/jira/browse/WICKET-1856
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>            Assignee: Matej Knopp
>            Priority: Trivial
>
> [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.
-
You can reply to this email to add a comment to the issue online.