Placeholder in <h:inputText with JSF 1.x

Asked

Viewed 54 times

0

Good morning,

I’m with a system developed with version 1.2 of JSF and Richfaces 3.3

I’ve been researching about including a placeholder in the element <h:inputText jsf but only found tutorials for jsf version 2 or primefaces. I also found a way to do it with Richfaces, but only version 4 onwards. I found nothing that could help me.

Does anyone know a way to include a placeholder in the tag <h:inputText ? as in normal HTML:

<input value="item" placeholder="seach"/>

1 answer

0

You can try the following:

<h:inputText value="item" placeholder="search" id="search"/>
<p:watermark for="search" value="Meu placeholder" />

Remember to add the attribute id="nome" in your inputText, and in the other tag, you put the attribute for referencing this id, like the example above.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.