6 Replies Latest reply on May 3, 2007 7:00 AM by theute

    can't access preference at runtime

    mohan_chaudhari

      Hi,
      I want to create different instances of same portlet depending upon preferences so
      I put

      name
      XYZ

      in portlet-instance.xml

      And try to get value by
      String pref = null;
      Request.getPreferences().getValue("name", pref);
      System.out.println(pref);

      It shows null Why? The code works if i put preferences in portlet.xml. can i put preferences in portlet-instances.xml and fetch it's value at runtime ?

      When i look at newsportlet example i found expire prefrence at both places portlet-instance.xml as well as portlet.xml ? why is it so?

      Thanks in advance