From: <ju...@jb...> - 2005-05-10 14:34:30
|
you mean have a portlet linking to another portlet ? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877174#3877174 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877174 |
From: kevs3d <nu...@jb...> - 2005-05-10 14:36:40
|
Hi, There isn't any way as part of the JSR-168 portlet spec, which the JBoss Portal is implemented against. However, it's so useful that the JBoss guys may have implemented an extension specific to their APIs - but I don't know what. The way we did it (back in the days of the Alpha version) was to construct JBoss portal specific URLs. E.g. the way JBoss portal references portlets is through a defined URL format, so if you construct the URLs appropriately you can get other portlets to maximise: http://localhost:8080/portal/index.html?ctrl:id=window.default.CMSPortletWindow&ctrl:type=nav&ctrl:windowstate=maximized So if you know the window ID of your portlet (from your XML config) then you can construct a URL to bring it to the front. You can call portlet actions directly using URLs also. So if you code up a URL with an action request in it, e.g. http://localhost:8080/portal/index.html?ctrl:id=window.default.UserPortletWindow1&ctrl:type=render&ctrl:windowstate=maximized&op=showRegister Add that as the HREF of a link within one portlet, and when clicked it will call an action within another, in this case calling the "showRegister" portlet action event handler on the UserPortlet. Obviously this requires specific knowledge of the JBoss portal and also knowledge of what portlet Window IDs you have - but it works. Hope this helps, Cheers, Kev View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877178#3877178 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877178 |
From: sven.schulz <nu...@jb...> - 2005-05-10 14:39:01
|
What I mean is to notify a portlet of changes in another portlet. Suppose you have a portlet that presents a tree of elements. When a user selects one of the elements by clicking on it, a view in another portlet should be updated containing the details of the selected element (Master/Detail). View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877180#3877180 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877180 |
From: <ju...@jb...> - 2005-05-10 14:42:01
|
ok, I am asking because portlet communication means a lot of different things for people and the one I said is the most requested. what is the scope of event delivery ? per user ? could you describe it ? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877183#3877183 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877183 |
From: <ju...@jb...> - 2005-05-10 14:39:58
|
I think we are going to do something for 2.0.1 or 2.2. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877182#3877182 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877182 |
From: sven.schulz <nu...@jb...> - 2005-05-10 14:52:57
|
Think of the Windows Explorer. There is a tree showing the directory structure and a detail view showing the contents of the selected folder. Now imagine that you would implement such an explorer within a portal (not necessarily for file systems). One way is to provide a portal for the tree structure and one for the detail view. When a user (so, yes the scope is per user) selects an element in the tree portal, the detail portal view is updated to show the details (e.g. files) of the element. What I think of is some kind of messaging. I think a phased approach would be beneficial. In one of the phases portals may emit messages to channels. In a subsequent phase those messages may be received by polling the channels. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877189#3877189 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877189 |
From: paulhh <nu...@jb...> - 2005-05-10 15:11:03
|
For reference, here's a response from the end of last year with respect to JSR-168: http://mail-archives.apache.org/mod_mbox/portals-pluto-dev/200411.mbox/%3c4...@ap...%3e I think what you're looking for could be addressed in the next version of the standard. Meanwhile, most portals have their own different ways of doing this. Cheers Phh. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877195#3877195 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877195 |
From: joehobson <nu...@jb...> - 2005-05-10 16:34:45
|
I ran into this same limitation in the JSR-168 spec. the functionality was important enough to me that i found a workaround for it, and one that is not specific to JBP. If you have two portlets in a portlet-app then they share application scope session attributes. I have a navigation portlet in the left column, and a view portlet as the main content. My navigation consists of ActionURL links, sending a param for which page to view. The processAction stores the page to view in the session attribute. When each of the portlets go thru their doView rendering, the session attribute is set and they display based on that. So the navigation portlet can show which page the user is on, and the main content portlet can display the page that was chosen. It's not the most elegant approach, but it's working so far. I would also like for the spec to expand to impliment some form of interportlet communication, but for now i'll just use session attributes. ... .joe View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877221#3877221 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877221 |
From: sven.schulz <nu...@jb...> - 2005-05-10 16:44:33
|
I consider to implement a Interportlet communication (IPC) service, that is event based. Any input is much appreciated. I will post a little architecture description tomorrow. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877223#3877223 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877223 |
From: fernir <nu...@jb...> - 2005-05-10 19:42:32
|
There is a another specification that defines a contract between portal consumer and portlet consumer for remote portlets utilizing soap - WSRP (http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsrp). Second version of this specification that have been discussed now introduces event handling mechanism that will allow consumer to distribute events to any portlet and any portlet to generate events as a result of perform action or event distribution call. My suggestion would be to use this specification as a guide line for even support architecture. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877240#3877240 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877240 |
From: sven.schulz <nu...@jb...> - 2005-05-10 19:56:13
|
Hi fernir, is there a spec. draft available already. Where can I find it? Hope this spec. is not to complex, since implementing a complex system would be not that beneficial in the face of an emerging JSR-168 successor. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877245#3877245 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877245 |
From: <roy...@jb...> - 2005-05-12 01:44:38
|
WSRP 2.0 will be implemented in JBoss Portal in the next version - 2.2. Our Novell team will be handling the ins and outs, since I stubbornly refuse to read the WSRP spec. ;-) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877410#3877410 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877410 |
From: fernir <nu...@jb...> - 2005-05-12 15:34:51
|
There is no public draft of WSRP 2.0 specification. You will have to join WSRP TC group. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877493#3877493 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877493 |
From: dajevtic <nu...@jb...> - 2005-05-15 10:26:13
|
Hi. There may be no standard, but this code works just fine for us. Define a class to which all portlets have access and change it according to your needs: import java.util.Hashtable; public class InterPortletCommManager { private static InterPortletCommManager thisMgr = null; private Hashtable something; private InterPortletCommManager() { try { something = new Hashtable(); // do any initialization of local variables here } catch (Exception ex) { } } public static InterPortletCommManager getInstance() { if (thisMgr == null) { thisMgr = new InterPortletCommManager(); } return thisMgr; } public Object getObject(String portletId) { // retrieve an Object by using a portlet ID return something.get(portletId); } public void setObject(String portletId, Object someObject) { // use the ID of a portlet as a key for the object to be stored something.put(portletId, someObject); } } with InterPortletCommManager.getInstance() all portlets have access to the Vector "something". Of course you can create other methods and other objects to use amongst all portlets. Hope it helps. Regards, dj View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877775#3877775 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877775 |
From: dajevtic <nu...@jb...> - 2005-05-15 10:32:29
|
Sorry, forgot to mention that portlets accessing this Manager must run in the same JVM (on the same server) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877776#3877776 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877776 |
From: <ju...@jb...> - 2005-05-16 01:08:59
|
Thanks for sharing the idea. It is part of the thing we would like to add in future release. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877793#3877793 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877793 |
From: dajevtic <nu...@jb...> - 2005-05-16 09:22:04
|
A good idea would be to use the session Id of the user as the key. That way, another portlet could retrieve the object by just passing the session id to the Manager class and retrieve the contents. We mainly use this to store request parameters which are posted from one portlet and being retrieved by another one. This can be implemented as a stack as well, pushing parameters from one portlet and popping the parameters from another portlet. I'll be glad to help if anyone has problems/questions regarding this matter. Regards! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877806#3877806 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877806 |
From: <ju...@jb...> - 2005-05-16 09:55:03
|
would you work on implementing in JBoss Portal under a "tools" module that would contain various tools for inter portlet communication ? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877810#3877810 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877810 |
From: dajevtic <nu...@jb...> - 2005-05-16 10:02:12
|
Certainly, I would be glad to contribute any helpful tools required for interportlet communication. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877811#3877811 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877811 |
From: dajevtic <nu...@jb...> - 2005-05-16 11:36:24
|
I have developed a PortletForm class, which is similar to the above example. It can be configure to accept any form data posts from a user for a specific portlet and make the form data available to another registered portlet (for the same user). This may be a nice solution for Jboss Portal to handle forms inside portlets and communicate them to other portlets. What do you think? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877820#3877820 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877820 |
From: <ju...@jb...> - 2005-05-16 11:38:16
|
could you give example for instance of how it can be used ? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877821#3877821 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877821 |
From: dajevtic <nu...@jb...> - 2005-05-16 12:38:51
|
Of course. Here is a small code snippet of how it can be used: Portlet with form: public void processAction(ActionRequest request, ActionResponse response) { PortletFormManager.getInstance().setFormData(request); } places all request parameter names and parameter values into the PortletFormManager. Portlet displaying the values: Hashtable requestParameters = PortletFormManager.getInstance().getObject(request.getPortletSession().getId()); if (requestParameters != null) { Iterator parameterValues = requestParameters.values().iterator(); while (parameterValues.hasNext()) { System.out.println((String)parameterValues.next()); } } This is the easiest way. The PortletFormManager also has methods for retrieving the form data as a Map, Collection or Enumeration. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877822#3877822 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877822 |
From: sdhaliwal <nu...@jb...> - 2005-05-16 12:40:46
|
Will this approach for Interportlet communication work for communication across portlets deployed as part of separate webapps. What will be the behavior in a clustered environment. We have a requirement where portlets deployed as part of different webapps (part of the same portal) must exchange some information and change behavior accordingly. The portal will be deployed in a jboss cluster. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877823#3877823 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877823 |
From: <ju...@jb...> - 2005-05-16 12:46:31
|
clustered env would need something more complicated View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877825#3877825 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877825 |
From: sdhaliwal <nu...@jb...> - 2005-05-16 12:51:33
|
If you are using per webapp class loader (not using JbossWebLoader) which will be the default for the final release, even the portlets in different webapps within the same JVM could have a problem. We have been toying with the idea of using TreeCacheAop View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877828#3877828 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877828 |