ほとんどの場合、次のようなものが表示されます。
Last cause: The component(s) below failed to render. Possible reasons could be that: 1) you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered), 2) if your components were added in a parent container then make sure the markup for the child container includes them in <wicket:extend>.
1. [WebMarkupContainer [Component id = link]]
2. [BrowserInfoForm [Component id = postback]]
3. [Form [Component id = postback]]
4. [TextField [Component id = navigatorAppName]]
5. [TextField [Component id = navigatorAppVersion]]
6. [TextField [Component id = navigatorAppCodeName]]
7. [TextField [Component id = navigatorCookieEnabled]]
8. [TextField [Component id = navigatorJavaEnabled]]
9. [TextField [Component id = navigatorLanguage]]
10. [TextField [Component id = navigatorPlatform]]
11. [TextField [Component id = navigatorUserAgent]]
12. [TextField [Component id = screenWidth]]
13. [TextField [Component id = screenHeight]]
14. [TextField [Component id = screenColorDepth]]
15. [TextField [Component id = utcOffset]]
16. [TextField [Component id = utcDSTOffset]]
17. [TextField [Component id = browserWidth]]
18. [TextField [Component id = browserHeight]]
19. [TextField [Component id = hostname]]
これらのコンポーネントのほとんどは含まれてBrowserInfoForm
おり、フォームが情報を収集するために実際に必要です。
「リンク」および「ポストバック」コンポーネントは にあるBrowserInfoPage
ため、これをサブクラス化する場合は、html マークアップに含める必要があります。
マークアップは、BrowserInfoPage
ウィケットのバージョンによって若干異なる場合があります (ただし、それほど大きくはない可能性があります)。私は:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:wicket="http://wicket.apache.org">
<head>
<meta wicket:id="meta" http-equiv="refresh" />
</head>
<body onload="javascript:submitform();">
If you see this, it means that both javascript and meta-refresh are not support by
your browser configuration. Please click <a wicket:id="link" href="#">this link</a> to
continue to the original destination.
<div wicket:id="postback"></div>
</body>
</html>
クライアント情報を収集する作業を行うには、マークアップ<body onload="javascript:submitform();">
に、「ポストバック」セクションにあるフォーム自体を含める必要があります。
あなたが見ているのは、おそらく「これを見たら…」で始まるメッセージです。あなたの問題を再現しようとして、私はこれを見たことがありませんが、元の宛先への更新/リダイレクトの前にしばらく表示される可能性があると思います. 「CustomBrowserInfoPage.html」に次のようなものを使用することで、おそらくそれを排除できます。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:wicket="http://wicket.apache.org">
<head>
<meta wicket:id="meta" http-equiv="refresh" />
</head>
<body onload="javascript:submitform();">
<a wicket:id="link" href="#"></a>
<div wicket:id="postback"></div>
</body>
</html>
からのフィールドのいずれかBrowserInfoForm
が表示されている場合、それらを非表示にするのは面倒です。しかし、とにかく表示されないと思います。
ただし、これを行うと、JavaScript を無効にしているユーザーには空白のページが表示され、実際のページにアクセスできなくなることに注意してください。それがメッセージと「リンク」の理由です。