JavaServer Faces (JSF) Converters and Navigation

Test your knowledge of JSF converters, validators, and navigation rules including faces-config configuration

16 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

JSF is

  1. A presentation technology
  2. A technology for specifying business rules
  3. A persistence technology
  4. None of the above
Question 2 Multiple Choice (Multiple Answers)

What's true about this navigation rule ? /page.jsp

  1. It's valid navigation rule
  2. It will generate RuntimeException due to lack of <from-outcome> tag
  3. page.jsp will never be displayed with this navigation rule
  4. It's not proper (although it's valid) navigation-rule. It should have <from-outcome> tag
Question 3 True/False

Given the following code fragments: * outcome /page.jsp and outcome /page.jsp Do they have the same effect ?

  1. True
  2. False
Question 4 Multiple Choice (Single Answer)

Part of faces-config: hello.jsp Hello login.jsp Turtle powerRanger.jsp And the ActionLink in the JSP: <h:commandLink value="Click" action="hugo" /> What will happen if we click on the link?

  1. There will be an server error.
  2. We will stay on the same page.
  3. We will land on the login Page.
  4. There is no h:commandLink tag.
  5. We will land on the powerRangers Page.
Question 5 True/False

Is it possible to use EL to configure navigation rules, ex.: index.jsp?id=#{myBean.id}

  1. True
  2. False
Question 6 Multiple Choice (Single Answer)

What is the result when commandLink/commandButton action method returns null for the navigation string.

  1. Throws an exception.
  2. Executes the action method and throws an exception.
  3. Executes the action method and renders current view.
  4. Controller will be in the same page
Question 7 True/False

The following configuration of navigation case is legal: #{myBean.action} /myPage.jsp

  1. True
  2. False
Question 8 True/False

If no navigation rule matches a given action, then the current page is redisplayed.

  1. True
  2. False
Question 9 Multiple Choice (Multiple Answers)

Of the following elements which are not valid as elements nested under the element?

  1. <name>
  2. <icon>
  3. <view>
  4. <description>
  5. <case>
Question 10 True/False

This is a valid declaration of a navigation rule. /main.jsp #{myBean.myMethod} nextpage /nextpage.jsp #{myBean.myMethod} lastpage /lastpage.jsp

  1. True
  2. False
Question 11 True/False

If an error occurs inside a convertor used to convert the value entered in a inputText field the isValid method of the field returns false.

  1. True
  2. False
Question 12 True/False

JavaServer Faces technology provides standard error messages that display on the page when conversion or validation fails.

  1. True
  2. False
Question 13 True/False

You can obtain the effect of an <h:outputFormat> tag using: <h:outputText ...> <f:convertDateTime ... />

  1. True
  2. False
Question 14 Multiple Choice (Multiple Answers)

The core convertDateTime converter has a property called dateStyle . Select from the options bellow the valid values for this property.

  1. short
  2. medium
  3. long
  4. full
Question 15 True/False

Can we add multiple validators for a tag?

  1. True
  2. False
Question 16 True/False

Can we add multiple convertors for a tag?

  1. True
  2. False