问题
I have added portal directory inside a public page contains users and organization
Q1>> I need to add portlet allow users depending on their roles to add edit organization and users depending on their roles outside the control panel "inside my new portlet in public page"?
OR
Inside portal directory portlet allow users depending on their roles to add edit organization and roles outside the control panel "inside my new portlet"?
Q2>> How to make custom fields required fields?
I'm new to liferay.
How to do that ?
回答1:
Approach 1 (not recommended since usage of EXT is discouraged by Liferay + you don't have much experience with Liferay)
- Create an EXT plugin to Modify Liferay's liferay-display.xml, and move your portlet's from list of Hidden category portlets to the category of your choice
- Create a hook plugin to change the UI of this portlet to make your custom fields mandatory
Approach 2 (recommended for its cleanliness & maintainability):
Create a custom portlet to achieve your requirements. Here's what you'll need to create:
- JSP to take necessary fields (Basic fields + your Custom Fields) from UI
- Portlet class that uses below classes
- Organization*ServiceUtil
- Expando*ServiceUtil
- Organization's getExpandoBridge() to populate your custom fields
来源:https://stackoverflow.com/questions/22145116/users-and-organization-creation-form