LRP-614 practice question 4 of 25
An administrator would like to add a new travel preferences section in the Miscellaneous section of the user form. The travel preferences are stored as custom fields. The recommended way to implement the solution using a hook plugin is to: (Please select all correct answers.)
Full set: 144 questionsThe recommended, non-invasive method to add a new section to the user form is to use a hook plugin. This involves two main steps. First, you must define a portal property, such as users.form.my.account.miscellaneous, in a portal.properties file within your hook. This property tells Liferay to include your custom JSP in the specified section of the form. Second, within that custom JSP, you must use the Liferay UI taglib, specifically the tag, to render the custom fields. This tag handles the display and ensures that the values are automatically saved by Liferay's core Struts action upon submission, making a custom action hook unnecessary.
A. Modifying a core JSP like edituser.jsp directly is not recommended as it is an invasive customization that can easily break during portal upgrades.
C. A Struts action hook is not necessary because Liferay's existing user management actions automatically process and persist custom field (Expando) values submitted from the form.
1. Liferay Portal 6.2 Developer Guide, Chapter 11: Hooks, Section: "Adding a New User Field with a Hook". This section provides a step-by-step tutorial that directly implements the solution described in options B and D. It details creating a hook to add a portal.properties file that injects a custom JSP into the user form, and then using the tag within that JSP. (Note: This principle is identical for Liferay 6.1, which the LRP 614 exam covers).
2. Liferay Portal Source Code (portal-impl/src/portal.properties), Liferay Portal 6.1 CE GA3. The portal.properties file defines the default sections for user forms. For example, the property users.form.my.account.miscellaneous=details,organizations,user-groups,roles,communities shows the default JSPs included. A hook overrides this property to add a new JSP, directly supporting the method in option B.
3. Liferay Taglib Documentation. The official documentation for the tag specifies its use for displaying and enabling the persistence of Expando attributes for a given model, which is the correct implementation for the JSP as described in option D.
Keep practicing
Take the free LRP-614 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LRP-614 practice questions
- Question 1The best way to add a new language key to the portal is through:
- Question 2In a JSP that includes the tag, the method to check permissions is:
- Question 3A hook plugin can be used to: (Please select all correct answers.)
- Question 5The following statements about plugins are true: (Please select all correct answers.)
- Question 6All Service Builder entities contain a local reference to: (Please select all correct ans…
- Question 7A class that extends MVCPortlet must implement:
