JavaServer Faces (JSF) Converters and Navigation
Test your knowledge of JSF converters, validators, and navigation rules including faces-config configuration
Questions
JSF is
- A presentation technology
- A technology for specifying business rules
- A persistence technology
- None of the above
What's true about this navigation rule ? /page.jsp
- It's valid navigation rule
- It will generate RuntimeException due to lack of <from-outcome> tag
- page.jsp will never be displayed with this navigation rule
- It's not proper (although it's valid) navigation-rule. It should have <from-outcome> tag
Given the following code fragments: * outcome /page.jsp and outcome /page.jsp Do they have the same effect ?
- True
- False
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?
- There will be an server error.
- We will stay on the same page.
- We will land on the login Page.
- There is no h:commandLink tag.
- We will land on the powerRangers Page.
Is it possible to use EL to configure navigation rules, ex.: index.jsp?id=#{myBean.id}
- True
- False
What is the result when commandLink/commandButton action method returns null for the navigation string.
- Throws an exception.
- Executes the action method and throws an exception.
- Executes the action method and renders current view.
- Controller will be in the same page
The following configuration of navigation case is legal: #{myBean.action} /myPage.jsp
- True
- False
If no navigation rule matches a given action, then the current page is redisplayed.
- True
- False
Of the following elements which are not valid as elements nested under the element?
- <name>
- <icon>
- <view>
- <description>
- <case>
This is a valid declaration of a navigation rule. /main.jsp #{myBean.myMethod} nextpage /nextpage.jsp #{myBean.myMethod} lastpage /lastpage.jsp
- 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.
- True
- False
JavaServer Faces technology provides standard error messages that display on the page when conversion or validation fails.
- True
- False
You can obtain the effect of an <h:outputFormat> tag using: <h:outputText ...> <f:convertDateTime ... />
- True
- False
The core convertDateTime converter has a property called dateStyle . Select from the options bellow the valid values for this property.
- short
- medium
- long
- full
Can we add multiple validators for a tag?
- True
- False
Can we add multiple convertors for a tag?
- True
- False