[jboss-user] [JBoss Portal] - Re: Configure Portlet-Instances
matallen
do-not-reply at jboss.com
Mon Jul 13 12:44:42 EDT 2009
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
More information about the jboss-user
mailing list