Question about portlets intercommunication

6 views
Skip to first unread message

Dmitriy Ivanov

unread,
Jun 22, 2011, 9:37:30 AM6/22/11
to ajaxportal
Hello everybody.

I'd like to ask - in ajaxportla can one portlet refresh another
portlet without refreshing whole page?
As I understand portlet can easily partial refresh its own content,
but what about content of another portlet(s)? Is there any mechanism?

WBR, Dmitriy.

s-so...@tut.by

unread,
Aug 10, 2011, 1:21:23 PM8/10/11
to ajaxportal
Hello Dmitriy,

Sorry for delay (vacation and etc.), I stated a special page (http://
code.google.com/p/ajaxportal/wiki/Interportlet_communication) as an
answer on your question, but it’s not quick process.

Short answer:
1) Direct using of JavaScript API
2) Messaging (on server and client sides).

The format of the message is the simaular like in JSR-286. The API is
not finished.

I guess I will finish the wiki page about portlet inter communication
to the end of the month.

Best regards,
Sergei Sokolov

--------------------------------------------

Соколов Сергей

unread,
Aug 10, 2011, 1:39:00 PM8/10/11
to ajaxp...@googlegroups.com
Hello Dmitriy,

Content update in Ajax Portal is executing using ajax4all library.

The easiest way is find form id of another portlet (as Web
application), get DOM object and execute submit method.

Or direct usage of ajax4all library (see real code of the demo):
//////////////////////////////////////////////////////////////////////////////////////////////////////
var portletId = "portlet" + generateId();
var portlet = new
com.sokolov.portal.Portlet(portletId, "Photos", DEFAULT_CONTAIER,
null, DEFAULT_ICON);
portlet.init();
try {
portlet.setDraggable(true);

ajaxCall("http://blablabla.com/socnet/photos.html", 'post',
getCharset(), '', portlet.getContentId());
refreshRegion(DEFAULT_CONTAIER);
} catch (e) {}
//////////////////////////////////////////////////////////////////////////////////////////////////////

Best regards,
Sergei Sokolov

2011/6/22, Dmitriy Ivanov <johns...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages