用户和组织创建表格 [英] Users and organization creation form

查看:99
本文介绍了用户和组织创建表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在包含用户和组织的公共页面内添加了门户目录

Q1 >>我需要添加portlet,以便允许用户根据他们的角色来添加编辑组织,并且根据用户的角色来添加用户,取决于他们在控制面板在公共页面上的新portlet内"之外的角色?

OR

内部门户目录portlet是否允许用户根据其角色在我的新portlet内部"控制面板之外添加编辑组织和角色?

Q2 >>如何将自定义字段设置为必填字段?

我是Liferay的新手.

该怎么做?

解决方案

方法1(由于Liferay不鼓励使用EXT,因此不建议使用,因为您对Liferay没有太多经验)

  1. 创建一个EXT插件来修改Liferay的liferay-display.xml,并将您的Portlet从隐藏类别" Portlet列表移至您选择的类别
  2. 创建一个挂钩插件来更改此portlet的UI,以使您的自定义字段为必填

方法2(建议其清洁和可维护性):

创建一个定制portlet来满足您的要求.这是您需要创建的内容:

  1. JSP接受必填字段(基本字段+您的自定义字段) 从用户界面
  2. 使用以下类的Portlet类
  3. Organization * ServiceUtil
  4. Expando * ServiceUtil
  5. 组织的getExpandoBridge()来填充您的自定义字段

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 ?

解决方案

Approach 1 (not recommended since usage of EXT is discouraged by Liferay + you don't have much experience with Liferay)

  1. 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
  2. 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:

  1. JSP to take necessary fields (Basic fields + your Custom Fields) from UI
  2. Portlet class that uses below classes
  3. Organization*ServiceUtil
  4. Expando*ServiceUtil
  5. Organization's getExpandoBridge() to populate your custom fields

这篇关于用户和组织创建表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆