p:watermark with a bean variable
-
- Posts: 15
- Joined: 04 Aug 2010, 13:03
This is, probably, quite a stupid question, but is it possible to set the p:watermark value as a bean variable. For example, <p:watermark for="someId" value="#{mybean.value}"/>. If it is possible, how should I do it? 10x
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Have you tried doing it? Doesn't it work?
-
- Posts: 15
- Joined: 04 Aug 2010, 13:03
Yes, I have tried. Unfortunately, it does not work for me. Sample from my code:
<h:inputText value="#{openinghours.modExactDay}" size="1" required="false" id="exactDay" />
<p:watermark for="exactDay" value="#{openinghours.selectedSchedule.day}"/>
[EDIT] As it turns out, the value was null, so this is probably why it wasn't working
<h:inputText value="#{openinghours.modExactDay}" size="1" required="false" id="exactDay" />
<p:watermark for="exactDay" value="#{openinghours.selectedSchedule.day}"/>
[EDIT] As it turns out, the value was null, so this is probably why it wasn't working
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Yes, it should work with EL expressions resolving to not-null.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 53 guests