[jboss-user] [JBoss Portal] - preferences in portlet-instances.xml

habicht do-not-reply at jboss.com
Thu Aug 30 02:08:49 EDT 2007


hi! i'm trying to read preferences out of the portlet-instances.xml but it doesn't work. i've read other posts concerning the same topic but i couldn't find a solution. the only thing that works is getting the value from the portlet.xml file.

anonymous wrote : public class PortletA extends GenericPortlet
  | {
  |    protected void doView(RenderRequest request, RenderResponse response)
  |       throws PortletException, PortletSecurityException, IOException
  |    {	
  |       System.out.println(request.getPreferences().getValue
  |    }
  | 
  | }

anonymous wrote : <?xml version="1.0" encoding="UTF-8"?>
  | <portlet-app id="PortletA" version="1.0">
  |   
  |     <portlet-name>portleta</portlet-name>
  |     <display-name>portleta</display-name>
  |     <portlet-class>test.PortletA</portlet-class>
  |     <expiration-cache>0</expiration-cache>
  |     
  |       <mime-type>text/html</mime-type>
  |       <portlet-mode>VIEW</portlet-mode>
  |     
  |     <portlet-info>
  |       <short-title>Portlet A</short-title>
  |       Portlet
  |     </portlet-info>
  |     <portlet-preferences>
  |       
  |         test
  |         portlet.xml
  |       
  |     </portlet-preferences>
  |   
  | </portlet-app>

anonymous wrote : 
  |   
  |     
  |       <instance-id>PortletAInstance</instance-id>
  |       <portlet-ref>portleta</portlet-ref>
  |       
  |         
  |           test
  |           portlet-instances.xml
  |         
  |       
  |     
  |   
  | 

so looking at my files this means that i receive portlet.xml inestad of portlet-instances.xml

Windows XP Pro SP2
jdk 1.5.0_09
JBoss Portal 2.6 Bundle (binary)
Postgres 8.3
Hibernate 3

thanks in advance
habicht

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079427#4079427

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079427



More information about the jboss-user mailing list