jsf - Richfaces placeholder not working -


i'm using jsf 2.0 , i'm trying use richfaces 4.3's placeholder. here's jsf code

<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> 

this how it's being rendered:

<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> 

the #{bean.firstvalue}" null, not empty string. not sure if matters or not. problem placeholder text not showing up.

any ideas?

--edit-- checking js console, says "richfaces not defined". i'm sure i'm using richfaces 4.3.

ok, so, figured out after ton of research. turns out jsf 2.0 , richfaces don't along if use <head>. have use <h:head> inserts required dependencies. and... it!


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -