JSFテンプレート機能を使う(1) [JSF]
テンプレート内で別のxhtmlをincludeしたら警告が発生した。
1つまたは複数のリソースに 'head' のターゲットがありますが、'head' コンポーネントがビューで定義されていません。
テンプレート・クライアント
<body>
<ui:composition template="/layout/template02.xhtml">
<ui:define name="left">
サイド・メニュー
</ui:define>
<ui:define name="top">
<ui:include src="/comment/top.xhtml" />
</ui:define>
top.xhtml
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html">
<head>
<title>コメント メニュー</title>
</head>
<body>
<head>定義で何かが足りないらしい。
調べたところ、headがJSFとして明示的に定義されていないが問題らしい。
そこでtop.xhtmlのheadを以下のように修正。
<head jsfc="h:head">
これで警告メッセージは出なくなった。
1つまたは複数のリソースに 'head' のターゲットがありますが、'head' コンポーネントがビューで定義されていません。
テンプレート・クライアント
<body>
<ui:composition template="/layout/template02.xhtml">
<ui:define name="left">
サイド・メニュー
</ui:define>
<ui:define name="top">
<ui:include src="/comment/top.xhtml" />
</ui:define>
top.xhtml
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html">
<head>
<title>コメント メニュー</title>
</head>
<body>
<head>定義で何かが足りないらしい。
調べたところ、headがJSFとして明示的に定義されていないが問題らしい。
そこでtop.xhtmlのheadを以下のように修正。
<head jsfc="h:head">
これで警告メッセージは出なくなった。
2015-10-16 14:01
nice!(0)
コメント(1)
トラックバック(0)
こんばんは。
勉強させていただきます!
by 師子乃 (2018-12-05 20:28)