jsf - <p:watermark> appears unparsed in generated HTML source -


i'm using jsf 2.0. i've been trying render placeholder input text, , i'm trying primefaces' watermark. 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:p="http://primefaces.org/ui"> .... .... <h:form>     <table>         <thead>             <tr>                 <th>                     <h:outputtext value="header"/>                 </th>             </tr>         </thead>         <tbody>             <tr>                 <td>                     <h:inputtext id="first" value="#{bean.firstvalue}"/>                     <p:watermark for="first" value="fill me"/>                 </td>             </tr>         </tbody>     </table> </h:form> 

this how it's 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>             <input id="j_id_1v:first" name="j_id_1v:first" type="text" value>             <p:watermark for="first" value="fill me"></p:watermark>         </tbody>     </table> </form> 

the value in #{bean.firstvalue} null. not sure if that's alright, or if should empty string. problem rendered input field empty. no watermark. doing wrong?

you need add primefaces jar too, add jsf jar/s

p.s if want use watermark can use jquery watermark plugin that...


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 -