-
1. Re: How can add information extra for a user in the registry portlet?
hanspeter Sep 30, 2010 9:29 AM (in response to willojavier)Hi Wilson,
the info from the docu ist correct, but the info is not really deep.
To enter some more fields to a user profile you have to extend the registration
portlet (or write a new one). Not really nice compared to the old version!
1) download the src
2) search for the UIRegisterInputSet
3) extend the form with fields you need like that:
addUIFormInput(new UIFormStringInput(EXTRA_NAME, EXTRA_NAME, null)
.addValidator(StringLengthValidator.class, 3,45)
.addValidator(MandatoryValidator.class)
.addValidator(ExpressionValidator.class, "^[\\p{L}][\\p{ASCII}]+$","FirstCharacterNameValidator.msg")
.addValidator(ExpressionValidator.class, "^[\\p{L}][\\p{L}._\\- \\d]+$", "ResourceValidator.msg.Invalid-char")
);4) build this part and deploy it, drop your database and restart your server
You can find further information about the exo WebUI here:
http://wiki.exoplatform.org/xwiki/bin/view/Portal/WebUI+Tutorial
hope that helps!