3 Replies Latest reply on Aug 23, 2006 2:18 PM by Bridget Wessel

    Getting a preference value

    Bridget Wessel Newbie

      I am having trouble retrieving a preference value. My portlet-instances.xml file looks like this:




      <instance-id>MRNInstance</instance-id>
      <portlet-ref>HealthCareMRNSearch</portlet-ref>


      resultsxml
      C:/Jobs/Health Care/HTML/medPatientSearch/webapp/WEB-INF/jsp/resultsdisplay.xsl
      <read-only>true</read-only>






      I see in my log that it gets registered like this:
      org.jboss.portal.core.impl.model.instance.PreferenceImpl{strings=[C:/Jobs/Health Care/HTML/medPatientSearch/webapp/WEB-INF/jsp/resultsdisplay.xsl], key=8, type=1, name=resultsxml}

      I don't see any errors in my log.

      But when I try to grab the value like this:
      String somePref = rRequest.getPreferences().getValue("resultsxml", "defaultvalue");

      It always returns my default value. rRequest is the RenderResponse being sent to my doView method. Do I need to reference the resultsxml key differently?

      Thanks for any help -
      Bridget