Multiple watermarks and inputtextareas in a datalist

Components, Ajax Framework, Utilities and More.
Post Reply
tomik
Posts: 32
Joined: 21 Jan 2011, 06:50

13 Mar 2011, 22:42

Hi,

What is the best way to have a datalist where each item has its own inputtextarea with an associated watermark (which is the same for all text areas)?

Right now, if I just have <h:inputTextarea id="comment" value=""/> and <p:watermark for="comment" value="Enter a comment" /> in the datalist, only the first text area displays the watermark.
I assume that is because any subsequent inputTextarea fields will have different ids to keep them unique. I tried to dynamically set the id of the text area component with <c:set target="#{component}" property="id" value="#{bean.Id}"/>, but that didn't work either.

Any help would be greatly appreciated.

Thanks!

T.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 15 guests