私は jsf 2.0 を使用しており、Richfaces 4.3 のプレースホルダーを使用しようとしています。これがjsfコードです
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich">
....
....
<h:form>
<table>
<thead>
<tr>
<th>
<h:outputText value="Header"/>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<h:inputText id="first" value="#{bean.firstValue}">
<rich:placeholder value="Fill me"/>
</h:inputText>
</td>
</tr>
</tbody>
</table>
</h:form>
これがどのようにレンダリングされているかです:
<form id="j_id_1v" name="j_id_1v" method="post" action"/mypage/app/main.xhtml" enctype="application/x-www-form-urlencoded">
<table>
<thead>
<tr>
<th>
"Header"
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span id="j_id_1v:j_id_2r">
<script id="j_id_1v:j_id_2rScript" type="text/javascript">
<!--
new RichFaces.ui.Placeholder("j_id_1v:j_id_2r", {"targetId":"j_id_1v:first","text":"Fill me"} );
//-->
</script>
</span>
<input id="j_id_1v:first" name="j_id_1v:first" type="text" value>
</td>
</tr>
</tbody>
</table>
</form>
#{bean.firstValue}" は null であり、空の文字列ではありません。これが問題かどうかは不明です。問題は、プレースホルダー テキストが表示されないことです。
何か案は?
--EDIT-- js コンソールを確認すると、「Richfaces が定義されていません」と表示されます。私はリッチフェイス4.3を使用していると確信しています。