We want to add a new field for the users and show it through the user profile console.
It is enough to access the groovy
folder inside the portal configuration in the root
application folder of Gatein
. Here is the complete path for the groovy
folder, if you are using JBoss:
JBOSS_CONF/deploy/gatein.ear/02portal.war/groovy
Otherwise, if you are using Tomcat, you will find it at:
webapps/portal/groovy
OrganizationPortlet
that adds the profiles fields to the users./groovy/ webui/form/UIVTabInputSet.gtmpl
:if (uicomponent.findComponentById("Nameofthenewprofileblock") == null) { org.exoplatform.webui.form.UIFormInputSet personalInputSet = new org.exoplatform.webui.form.UIFormInputSet("Nameofthenewprofileblock "); def String[] fields = ["user.name.mynewfieldname"]; uicomponent.addInput(personalInputSet, campi); uicomponent.addUIFormInput(personalInputSet); }
gatein.ear/exoadmin.war/WEB-INF/classes/locale/portlet/exoadmin/AccountPortlet_$$.properties
:UIUserInfo.label.user.mynewfield=My New Field Name:
The parameter $$
will be the locale value for the related resource bundle that is selected for the user session (the default value is en
).
3.137.184.102