Yes, I was overlooking the obvious.  Probably the best way to deploy two (or 
more) instances of a portlet is with multiple portlet elements in portlet.xml, 
so you end up with something like this:

  | <portlet-app ...>
  |  <portlet>
  |   <portlet-name>MyPortlet</portlet-name>
  |   <portlet-class>com.unisys.portlets.ThePortlet</portlet-class>
  |   <!-- portlet configuration goes here,
  |        like title, init-params, preferences, etc. -->
  |  </portlet>
  |  <portlet>
  |   <portlet-name>YourPortlet</portlet-name>
  |   <portlet-class>com.unisys.portlets.ThePortlet</portlet-class>
  |   <!-- portlet configuration goes here,
  |        like title, init-params, preferences, etc. -->
  |  </portlet>
  | </portlet-app>
  | 
There are at least 2 advantages to solving the problem this way:
1) You can change almost anything configurable: the title, init-params, 
preferences; anything in portlet.xml
2) It's JSR-168 compliant and so it should be portable

Alternatively, there are a couple of JBoss Portal-specific ways you can solve 
the problem but they only allow you to override Preferences and not other 
attributes like the portlet title.  The first Portal-specific way is to 
override preferences in the *-object.xml file, documented 
here:http://docs.jboss.com/jbportal/v2.2/reference-guide/en/html/xmldescriptors.html#d0e860
The other way is to use the JBoss Portal management portlet to create multiple 
instances of a portlet and then override preferences, documented here:
http://docs.jboss.com/jbportal/v2.2/user-guide/en/html/dynamicity.html#d0e1177

Regards,
Scott Dawson
Unisys


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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to