LRP-614 practice question 18 of 25
When adding new users to Liferay, the form will display the Details, Organizations and Personal Site sections based on the following property in…
Full set: 144 questionsThe statement is correct. In Liferay 6.1, a hook plugin is the standard mechanism for overriding a defined subset of properties from the core portal.properties file. The users.form.add.main property specifically controls which JSP segments are included in the "Add User" form in the Control Panel. The question correctly states that this property is defined in the liferay-hook610.dtd as being overridable. By deploying a hook that contains its own portal.properties file with the line users.form.add.main=details,organizations, the hook's property value will take precedence over the default portal value. Consequently, when Liferay renders the "Add User" form, it will only include the details and organizations sections, effectively removing the personal-site section from the user interface.
The "False" option is incorrect because the described process is a fundamental and intended feature of the Liferay hook architecture. Hooks are designed to allow such customizations, including the modification of portal properties, without altering the core Liferay source code. The mechanism described in the question is the precise, officially sanctioned method for achieving this specific UI modification.
1. Liferay Portal 6.1 Developer's Guide: Chapter 10, "Hooks". The section "Overriding and Adding Portal Properties" details this exact mechanism. It explains that to override portal properties, you create a portal.properties file in your hook's docroot/WEB-INF/src directory and specify the new values. The guide confirms that only a specific list of properties can be overridden this way.
2. Liferay Portal 6.1 Source Code (portal-impl/src/portal.properties): The default portal.properties file within the Liferay source code defines the property and its default value:
properties
Input a list of comma delimited sections that will be displayed in the user
form.
users.form.add.main=details,organizations,personal-site
users.form.update.main=details,password,organizations,personal-site,roles,user-groups,communities
This confirms the property's existence and purpose.
3. Liferay Portal 6.1 DTD (liferay-hook610.dtd): This Document Type Definition file, which governs the structure of the liferay-hook.xml deployment descriptor, includes the element. The existence of this element in the DTD is the formal declaration that a hook can contain a file to override portal properties.
xml
This structure indicates that the liferay-hook.xml file can point to a properties file for overriding portal settings.
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 4An administrator would like to add a new travel preferences section in the Miscellaneous …
- 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…
