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

  • SEARCH
  • Home
  • 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 6928151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:08:50+00:00 2026-05-27T11:08:50+00:00

Shouldn’t this line of code render a inputtext field with the placeholder text fill

  • 0

Shouldn’t this line of code render a inputtext field with the placeholder text “fill me” when using html5?

<h:inputText placeholder="fill me" />

I do not see any placeholder text. I thought everything that was not JSF was passed to the browser for rendering?

  • 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-05-27T11:08:51+00:00Added an answer on May 27, 2026 at 11:08 am

    I thought everything that was not JSF was passed to the browswer for rendering?

    This assumption is thus wrong. Unspecified component attributes are ignored by the JSF renderers.

    You have basically the following options to get it to work:

    1. If you’re already on JSF 2.2 or newer, set it as a passthrough attribute.

       <... xmlns:a="http://xmlns.jcp.org/jsf/passthrough">
      
       <h:inputText a:placeholder="fill me" />
      

      Note that I use a XML namespace prefix of a ("attribute") instead of p as shown in the tutorial, as it would otherwise clash with default XML namespace prefix p of PrimeFaces.

    2. Implement a custom renderer for <h:inputText> wherein you explicitly check and write the attribute.

    3. Implement a custom component which uses the aforementioned custom renderer.

    4. Implement a JS based solution wherein you grab the element from DOM and explicitly set the attribute.

    5. Look for a component library which supports this out the box. PrimeFaces for example has a <p:watermark> for this purpose with nice JS based graceful degradation for browsers which does not support the placeholder attribute on inputs.

    See also:

    • Custom HTML tag attributes are not rendered by JSF
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Shouldn't this be a pretty straightforward operation? However, I see there's neither a size()
Shouldn't this put the SPAN markers outside the phone number, not inside? String aParagraph
Shouldn't a browser's textarea display raw text? Look at the following snaps from this
This shouldn't be so hard but I just can't seem to get this to
I know that we shouldn't being using the registry to store Application Data anymore,
Shouldn't this work? string s; s = some string;
This shouldn't be hard...I have a menu and some content wrapped in a centered,
My task is necessary and shouldn't be canceled, how do I ask ProgressMonitor not
If this is a question that shouldn't be on SO, please let me know.
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.