Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP integration into WebSphere Portal
RAP integration into WebSphere Portal [message #118444] Wed, 14 January 2009 11:41 Go to next message
Marian Seitner is currently offline Marian SeitnerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi all!

I'm writing a bachelor thesis about how to integrate RAP applications into
WebSphere Portal. My current task is to provide a RAP app as a single
portlet.

The biggest problem seems to be missing "refresh" functionality to render
the current (UI-)state of the application again when it comes to portal
page refreshes.

At the moment I try to discover possible ways to achieve this. One thing
should be to redraw all widgets. According to the following method in
AbstractWidgetLCA WidgetAdapter initialization (and initial state
rendering) is done exactly once.

public final void render( final Widget widget ) throws IOException {
WidgetAdapter adapter = ( WidgetAdapter )WidgetUtil.getAdapter( widget );
if( !adapter.isInitialized() ) {
renderInitialization( widget );
widget.addDisposeListener( new DisposeListener() {
public void widgetDisposed( final DisposeEvent event ) {
DisposedWidgets.add( ( Widget )event.getSource() );
widget.removeDisposeListener( this );
}
} );
}
renderChanges( widget );
UITestUtil.writeId( widget );
adapter.setInitialized( true );
}

To render the current state of a widget after a refresh I think that both
initialzing the adapter and rendering the changes should work since the
widget itself should be unchanged.

Any thoughts on this?

I know that refreshing the page is more than simple widget redrawing but
that's just the first thing I had a look at.

Further comments are greatly appreciated!

Thanks,
Marian
Re: RAP integration into WebSphere Portal [message #118466 is a reply to message #118444] Thu, 15 January 2009 08:38 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Marian,

I'm not sure if re-rendering the widget makes sense to perform something
like a refresh. In fact, you want to refresh the model of your widgets
(e.g. perform a DB query or whatever), don't you? However, this can
hardly be done genericly.

In general, you also might run into trouble if you have more than one
portlet, each containing a separate RAP application. The framework can't
handle this at the moment.

Regards,
Stefan.

Marian Seitner schrieb:
> Hi all!
>
> I'm writing a bachelor thesis about how to integrate RAP applications
> into WebSphere Portal. My current task is to provide a RAP app as a
> single portlet.
>
> The biggest problem seems to be missing "refresh" functionality to
> render the current (UI-)state of the application again when it comes to
> portal page refreshes.
>
> At the moment I try to discover possible ways to achieve this. One thing
> should be to redraw all widgets. According to the following method in
> AbstractWidgetLCA WidgetAdapter initialization (and initial state
> rendering) is done exactly once.
>
> public final void render( final Widget widget ) throws IOException {
> WidgetAdapter adapter = ( WidgetAdapter )WidgetUtil.getAdapter( widget );
> if( !adapter.isInitialized() ) {
> renderInitialization( widget );
> widget.addDisposeListener( new DisposeListener() {
> public void widgetDisposed( final DisposeEvent event ) {
> DisposedWidgets.add( ( Widget )event.getSource() );
> widget.removeDisposeListener( this );
> }
> } );
> }
> renderChanges( widget );
> UITestUtil.writeId( widget );
> adapter.setInitialized( true );
> }
>
> To render the current state of a widget after a refresh I think that
> both initialzing the adapter and rendering the changes should work since
> the widget itself should be unchanged.
>
> Any thoughts on this?
>
> I know that refreshing the page is more than simple widget redrawing but
> that's just the first thing I had a look at.
>
> Further comments are greatly appreciated!
>
> Thanks,
> Marian
>
Re: RAP integration into WebSphere Portal [message #118491 is a reply to message #118466] Thu, 15 January 2009 11:46 Go to previous messageGo to next message
Ralf Zahn is currently offline Ralf ZahnFriend
Messages: 32
Registered: July 2009
Member
It's correct, what Stefan tells. Might be possible to integrate the RAP
platform into the WPS/WAS-own Eclipse-Platform to use the RAP platform as
a singleton, but using multiple UIs in one session is not supported.

What about the general concept of mapping the RAP UI artifacts to the
Portal concept? Does it make sense to integrate the whole RAP application
into one portlet? What would be the benefit of that?

And -instead of integration RAP into Portal- would it also be possible to
integrate the Portal concept into the RAP technology?

Just some food for thought. ;-)
Re: RAP integration into WebSphere Portal [message #119608 is a reply to message #118466] Mon, 26 January 2009 09:25 Go to previous messageGo to next message
Marian Seitner is currently offline Marian SeitnerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Stefan,

> I'm not sure if re-rendering the widget makes sense to perform something
> like a refresh. In fact, you want to refresh the model of your widgets
> (e.g. perform a DB query or whatever), don't you? However, this can
> hardly be done genericly.

Maybe I didn't clearly point out what I'd like to achieve. Consider a very
simple RAP application with just a view with a checkbox inside. Clicking
on that checkbox causes a roundtrip to inform the server that the checkbox
has been checked or unchecked, so the server-side "knows" about the
widget's state. Now if you refresh the current page it should be possible
to render that checkbox again with it's current state, because the
relevant information should be available in the session. The same should
work if a portal page gets rendered again.

> In general, you also might run into trouble if you have more than one
> portlet, each containing a separate RAP application. The framework can't
> handle this at the moment.

This is another issue ;-)

Kind regards,
Marian
Re: RAP integration into WebSphere Portal [message #119659 is a reply to message #119608] Mon, 26 January 2009 13:57 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Marian,

please see my comments below.

Cheers,
Rüdiger

Marian Seitner wrote:
> Hi Stefan,
>
>> I'm not sure if re-rendering the widget makes sense to perform
>> something like a refresh. In fact, you want to refresh the model of
>> your widgets (e.g. perform a DB query or whatever), don't you?
>> However, this can hardly be done genericly.
>
> Maybe I didn't clearly point out what I'd like to achieve. Consider a
> very simple RAP application with just a view with a checkbox inside.
> Clicking on that checkbox causes a roundtrip to inform the server that
> the checkbox has been checked or unchecked, so the server-side "knows"
> about the widget's state. Now if you refresh the current page it should
> be possible to render that checkbox again with it's current state,
> because the relevant information should be available in the session.
You are right, the relevant information is available and it would be
possible to enhance RAP so that it would update the client with the
current server-side state.

> The same should work if a portal page gets rendered again.
I don't know much about portlets but I currently see two obstacles:
* qooxdoo, the client-side Javascript library used by RAP, in its
current version assumes to be alone on the client document
* refreshing is significantly slower then usual request and if it
occurs frequently will probably make for a bad user experience

>
>> In general, you also might run into trouble if you have more than one
>> portlet, each containing a separate RAP application. The framework
>> can't handle this at the moment.
>
> This is another issue ;-)
>
> Kind regards,
> Marian
>
Re: RAP integration into WebSphere Portal [message #119672 is a reply to message #119659] Mon, 26 January 2009 15:11 Go to previous messageGo to next message
Marian Seitner is currently offline Marian SeitnerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Rüdiger,

> You are right, the relevant information is available and it would be
> possible to enhance RAP so that it would update the client with the
> current server-side state.

Very good news :-) Naturally I'd like to know what enhancements have to be
done to make this work. At this time I know about the following:
* Session-reuse on page refresh; As far as I see a new session gets
started everytime you refresh the page
* Widget re-rendering (as already said)
* Request handling/mapping to conform with portlet request flows (I'll
come back on this topic soon)
* ?

Generally I'm highly interested in further documentation about the
internals of RAP since most available docs are fairly user-oriented. Maybe
I should post on the dev mailing list?

> I don't know much about portlets but I currently see two obstacles:
> * qooxdoo, the client-side Javascript library used by RAP, in its
> current version assumes to be alone on the client document
> * refreshing is significantly slower then usual request and if it
> occurs frequently will probably make for a bad user experience

That's okay. The target of my thesis is to evaluate possible integration
options but I also have to depict what won't work and why.

Moreover the results of my work (theoretical aspects, portlet bridge
prototype) will be made public so that others can benefit of the results.

Kind regards,
Marian
Re: RAP integration into WebSphere Portal [message #119908 is a reply to message #119672] Wed, 28 January 2009 10:27 Go to previous message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Marian Seitner schrieb:
> Very good news :-) Naturally I'd like to know what enhancements have to
> be done to make this work. At this time I know about the following:
> * Session-reuse on page refresh; As far as I see a new session gets
> started everytime you refresh the page
> * Widget re-rendering (as already said)
> * Request handling/mapping to conform with portlet request flows (I'll
> come back on this topic soon)
> * ?
>

AFAIK the session doesn't survive a page refresh and I don't see any
possibility to change this behaviour. There's little documentation about
RAP internals, the best thing would be to try it out by yourself. To
be honest, I doubt that RAP/Qooxdoo is a good framework for portlets as
it is designed to write single page applications. However, I'm still
curious what you find out during your investigations :-)

Regards,
Stefan.
Previous Topic:List of founded bugs
Next Topic:the supposed uploaded file doesn't exist on disk after successful upload process
Goto Forum:
  


Current Time: Sun Dec 22 04:17:06 GMT 2024

Powered by FUDForum. Page generated in 0.03633 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top