Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8904169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:03:33+00:00 2026-06-15T02:03:33+00:00

I am trying to update the watermark messages dynamically based on the selected values

  • 0

I am trying to update the watermark messages dynamically based on the selected values from jsf selectOneMenu.The id being used for watermark component is “waterMark1”.
The watermark component is linked to an input text field.
On valueChange , i get an error message that the id waterMarkID1 could not be located.
I tried updating an outputText based on the selectOneMenu selection and kept the id as WatermarkID1.It works fine with the outputText.

Is there any way to display the watermark messages based on the bean values.Any help would be appreciated.

<h:selectOneMenu value="#{RequestBean.searchonType}" valueChangeListener="# {RequestBean.getValidateMsg}" id="searchUser">
                                <f:selectItems value="#{RequestBean.searchonTypeList}" />
                                <f:ajax event="change" update="waterMarkID1"  render="waterMarkID1"/>
                          </h:selectOneMenu>


                          <h:inputText id="searchTxt" styleClass="text_small" size="50" value="#{RequestBean.searchTxt}"/>

                          <p:watermark id="waterMarkID1" for="searchTxt" value="#{RequestBean.waterMarkID}"/>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:03:35+00:00Added an answer on June 15, 2026 at 2:03 am

    It seems that you can’t update the p:watermark component directly. However, updating the container which holds that component will update your watermark message too:

    <p:panel id="panel1">
        <h:selectOneMenu value="#{RequestBean.searchonType}" valueChangeListener="# {RequestBean.getValidateMsg}" id="searchUser">
            <f:selectItems value="#{RequestBean.searchonTypeList}" />
            <f:ajax event="change" render="panel1"/>
        </h:selectOneMenu>
    
    
        <h:inputText id="searchTxt" styleClass="text_small" size="50" value="#{RequestBean.searchTxt}"/>
        <p:watermark id="waterMarkID1" for="searchTxt" value="#{RequestBean.waterMarkID}"/>
    </panel>
    

    Note that you can reduce the elements enclosed by the p:panel, for example, to h:inputText and p:watermark only. The key is to update the container, not the watermark component.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to update a database with values from a csv file, the
When trying to update a subversion working copy from Netbeans, I get the following
Trying to update to a pointer from a function return. Just for background this
When trying to update the web reference to a deployed asp.net webservice from a
I was trying to update a framework that we used before, since they had
I'm trying to update a element on my site from a fancybox. In the
Im trying to update a value in one column based on a value in
Trying to update facebook status from iPhone app, it updates the status first time
I am trying to update a global javascript variable with a value from jsrender
I am trying update my table from c# ado.net with this function.I am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.