Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 9

Given the code fragment from a Facelet page:

On Line 1, you ae asked to insert a search box that displays the text "Search Here" via a placeholder.

Assume searchMB is a valid Managed Bean.

Which two options enable you to create a search box with a placeholder attribute on Line 1? (Choose two.)

    Correct Answer: C, D

    To create a search box with a placeholder attribute in a JSF (JavaServer Faces) application, we need to ensure that the code properly adheres to the JSF syntax and specifications. Therefore, options C and D are correct. Option C uses the `jsf:id` attribute along with the placeholder and value attributes correctly. Option D utilizes the `pt:placeholder` attribute, which is part of the pass-through attributes in JSF 2.2 and later, and correctly binds the value to the managed bean. Other options either misuse JSF syntax or attributes.

Discussion
ciellaf5

Must be C,D

orjavaOptions: CD

Answer: C D

devmsalehOptions: CD

C,D is correct