1 Reply Latest reply on Mar 3, 2009 11:01 AM by Piergiorgio Lucidi

    Setting Portlet Preferences in Jboss Portal

    lalit jangra Newbie


      i am working on JBoss portal customization & created one portlet for Address Book management.I have requirements to set per user preferences per portlet in JBoss Portal like number of contacts per page in address book for each user.

      One way i noticed is in Edit mode of portlet,call backend to store preferences.But in my case i have two back ends- first is JBoss Portal & other is Server handling address book.Server team wants to store these preferences in Portal itself not in backend.I also noticed setting preferences in tag in portlet.xml. But i can not use this also.

      So can anyone suggest me how i can store these preferences in JBoss Portal so when user logs out & again log in,he should get his preferences again as same.Can anyone please help me how to store user preferences in JBoss Portal using JBoss preference Management after getting it from portlet.

      j lalit

        • 1. Re: Setting Portlet Preferences in Jboss Portal
          Piergiorgio Lucidi Novice

          To manage preferences in your portlet you need to add preferences in your portlet.xml in this way:

           <title>Your Portlet Title</title>

          Then in your portlet you can use this snippet:
          public void processAction (ActionRequest request, ActionResponse
          throws PortletException, java.io.IOException {
           PortletPreferences pref = request.getPreferences();

          Hope this helps.