[Building Sakai] Extra fields for profile 2

Steve Swinsburg steve.swinsburg at gmail.com
Mon Jun 28 18:14:49 PDT 2010


Hi,

As I mentioned earlier, this is currently not easy but will be when some work is done on the backend (http://jira.sakaiproject.org/browse/PRFL-230)
Alternatively, rename some of the form elements to be what you want them to be.

To do the modification you require will require Hibernate and Wicket knowledge.

Checkout the source of 'common' from SVN. 
Edit SakaiPerson.hbm.xml and add the additional columns to the DB. 
Edit SakaiPerson.java to add the additional variables and getters/setters.

Checkout the source of 'profile2' from SVN.
Modify the UserProfile object to add these additional fields as well.
In tool/src/java/org/sakaiproject/profile2/pages/MyProfile.java edit the section that sets values from Sakaiperson into UserProfile.
In tool/src/java/org/sakaiproject/profile2/pages/panels edit the appropriate panel HTML to add the form elements with wicket:id's
In tool/src/java/org/sakaiproject/profile2/pages/panels edit the appropriate Java class to add the matching Wicket components for the HTML you added.

Build, deploy, debug.

If you also want this to show up when viewing someone else's profile, also do the same in ViewProfile.html and ViewProfile.java

cheers,
Steve


On 28/06/2010, at 10:21 PM, mohan at samudrasoftware.com wrote:

> Hi All,
> 
>   I want to add extra more fields to the profile2.  I require extra 4
> fields to profile2.
> 
>        Give any idea for me please and Its urgent requirement for our
> project. What are the modification are required for this?
> 
> 
> Thanks,
> ~Chandra Mohan
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



More information about the sakai-dev mailing list