User Settings not working.  Please help!

<TD noWraplign=right>I am trying to build some interactive portlets using User prefs and have had no luck. Any help would be greatly appreciated.
Here is my code for the first portlet (view_course_defaultView is set as a user preference in the web service):
privatevoidPage_Load(objectsender, System.EventArgs e)
IPortletContext context = PortletContextFactory.CreatePortletContext(Request, Response);
IPortletRequest pRequest = context.GetRequest();
IPortletResponse pResponse = context.GetResponse();
IPortletUser user = context.GetUser();
try
if(user.HasSettingsRight(SettingType.User))
pResponse.SetSettingValue(SettingType.User, "view_course_defaultView", "All");
else
Response.Write("You can't do that");
catch(Exception ex)
Response.Write(ex.Message + ex.StackTrace);
Here is my code for the second portlet (again view_course_defaultView is set as a User preference in the Web Service):
privatevoidPage_Load(objectsender, System.EventArgs e)
try
IPortletContext pContext = PortletContextFactory.CreatePortletContext(Request, Response);
IPortletResponse pResponse = pContext.GetResponse();
IPortletRequest pRequest = pContext.GetRequest();
IPortletUser pUser = pContext.GetUser();
if(pUser.HasSettingsRight(SettingType.User))
Response.Write(pRequest.GetSettingValue(SettingType.User, "view_course_defaultView"));
Response.Write(pRequest.GetSettingCollection(SettingType.User).Count);
catch(Exception ex)
Response.Write(ex.Message + ex.StackTrace);
The only thing written to the screen in the second portlet is 0 for the User settings count. Does anyone see what I am doing wrong?
Thanks,
Jackie Kajdzik

I am having the same issue.  The Admin, Portal and CommunityPortal prefs set fine.  However, the user pref will not set.  Could this be because this pref is not to be set in this manner?

Similar Messages

Maybe you are looking for

  • Latest version of Itunes for Windows Error 45075 Missing Componet

    I have had no problem with my IPad or Itunes for a year. Till today. I was moving Itunes from internal C drive to D. Freeing up space. It was suggested that I just uninstall and reinstall in new drive with clean copy from Itunes direct. So each time

  • I want to enable a PK in a tables with more than 1680 subpartitions

    Hi All i want to enable a PK in a tables with more than 1680 subpartitions SQL> ALTER SESSION ENABLE PARALLEL DDL ; Session altered. SQL> alter table FDW.GL_JE_LINES_BASE_1 enable constraint GL_JE_LINES_BASE_1_PK parallel 8; alter table FDW.GL_JE_LIN

  • MatGrp not appearing in PO Classification ???

    Hi, I added a new Characteristic 'MatGrp' to the Class of PO Release Strategy. However, this MatGrp does not appear in Classification but other existing Characteristics are appearing. I have tried deleting and recreating the Class, Release Strategy,

  • How to disable screen rotation in ios7 ?

    how to disable screen rotation in ios7 iphone 4s

  • GT70 Default Graphics Driver

    Hello! I've been having issues with the performance of my new GT70 when running games. It's so poor that the out-dated hardware I had intended to replace with the GT70 outperforms the games. I was wondering if it would be anything to do with the fact