If you configure your portlet-instance.xml like this:

<?xml version="1.0" standalone="yes"?>
  | <deployments>
  |    <deployment>
  |          <instance>
  |             <instance-id>XPortletInstance</instance-id>
  |             <portlet-ref>XPortlet</portlet-ref>
  |             <preferences>
  |                     <preference>
  |                             <name>name</name>
  |                             <value>X-Portlet</value>
  |                     </preference>
  |             </preferences>
  |             <security-constraint>
  |                     <policy-permission>
  |                             <action-name>admin</action-name>
  |                             <role-name>role1</role-name>
  |                     </policy-permission>
  |             </security-constraint>
  |          </instance>
  |    </deployment>
  |    <deployment>
  |     <instance>
  |             <instance-id>YPortletInstance</instance-id>
  |             <portlet-ref>YPortlet</portlet-ref>
  |             <preferences>
  |                     <preference>
  |                             <name>name</name>
  |                             <value>Y-Portlet</value>
  |                     </preference>
  |             </preferences>
  |             <security-constraint>
  |                     <policy-permission>
  |                             <action-name>admin</action-name>
  |                             <role-name>role1</role-name>
  |                     </policy-permission>
  |             </security-constraint>
  |     </instance>
  |   </deployment>
  | </deployments>

then you can retrieve the values within your portlet with this code:

renderRequest.getPreferences().getValue("name", "default_name");

and thus, make your X portlet act differentlyto your Y portlet instance 
accordingly

Hope this helps,
Mat

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243336
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to