Please review r1044240.
Now markup inheritance is supported too.
In your first mail you said :
In any case it returns the DOCTYPE of the page only, irrespective of Panel
or Border etc.
but current logic in MarkupUtil.isMarkupHtml5Compliant() uses a visitor to
read their doctype and returns false
It appeared that this helper doesn't work correctly for page inheritance.
The base page has !DOCTYPE html but the child page has just
wicket:extend ... /wicket:extend.
See org.apache.wicket.markup.WicketNamespaceTest.XXtestDoctype_InheritedPage().
On Wed, Dec 8, 2010 at 5:53 PM, Martin Grigorov
I'll check it over the weekend
Juergen
On Thu, Dec 9, 2010 at 12:22 PM, Martin Grigorov mgrigo...@apache.org wrote:
It appeared that this helper doesn't work correctly for page inheritance.
The base page has !DOCTYPE html but the child page has just
wicket:extend ... /wicket:extend.
See
Hi Juergen,
I just tried to use MarkupUtil.isMarkupHtml5Compliant() for the new HTML5
input types and it failed with:
Caused by: java.lang.NullPointerException
at org.apache.wicket.markup.html.MarkupUtil$1.component(MarkupUtil.java:56)
at
Hi Juergen,
I just tried to use MarkupUtil.isMarkupHtml5Compliant() for the new HTML5
input types and it failed with:
Caused by: java.lang.NullPointerException
at org.apache.wicket.markup.html.MarkupUtil$1.component(MarkupUtil.java:56)
at
Interesting. I thought I had a testcase with exactly that DOCTYPE. In
any case it returns the DOCTYPE of the page only, irrespective of
Panel or Border etc.
getMarkup() returning null means no markup found which would explain
the NPE as well. You are sure about your source code and markup?
The NPE happens with #getAssociatedMarkup() and at this point the
MarkupContainer is a Form
Replacing it with #getMarkup() returned the page's markup, i.e. all html,
and its markupstream had 'null' doctype.
I'll investigate further but you can also take a look at the application. It
is in
Correction, my bad.
The Form's getMarkup() returns just :
form wicket:id=form
input wicket:id=number type=number min=3.0 max=10.0
onchange=console.log(this.value)/br/
input type=submit value=Submit/
/form
so there is no doctype.
On Wed, Dec 8, 2010 at 5:48 PM, Martin Grigorov