Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Innoopract Webinar Questions - API Differences
Innoopract Webinar Questions - API Differences [message #111639] Fri, 07 November 2008 20:56 Go to next message
Adam is currently offline AdamFriend
Messages: 25
Registered: July 2009
Junior Member
Hello,

First of all I want to thank all of you who are on the team who put this
video/slide/examples together...they have been very useful in turning my
RCP application into a fully cross-target application. I do have a
question referring to the first API Differences slide:

It says "Not all RCP APIs are available in RAP" and lists FileDialog as
one, which I am using.

Q1: Does this mean that I should totally drop that functionality? Or do we
abstract the FileDialog class in a similar manner that is done w/ the
AboutAction example? So basically, what do I do about my Open/Save File
Dialogs? Should they be moved over to exclusively the PROJECT.rcp fragment?

Q2: What about KeyListeners? I use a dialog that does not allow the Finish
button to appear unless all 5 fields are completed...is there a workaround
for this? I know how to do it in traditional web development.

Q3: Finally, I have a set of handlers for desktop edit actions (copy,
paste, select all, etc.) which are obviously unnecessary for RAP, but
necessary for RCP. Should these handlers be moved to the PROJECT.rcp
fragment as well? How exactly do fragments work when I want to run the
entire application (the slides explain how to set up the fragments, but
not how to integrate them). Could you enlighten us more on this component?
Re: Innoopract Webinar Questions - API Differences [message #112024 is a reply to message #111639] Mon, 10 November 2008 18:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Adam wrote:
> Hello,
>
> First of all I want to thank all of you who are on the team who put this
> video/slide/examples together...they have been very useful in turning my
> RCP application into a fully cross-target application. I do have a
> question referring to the first API Differences slide:
>
> It says "Not all RCP APIs are available in RAP" and lists FileDialog as
> one, which I am using.
>
> Q1: Does this mean that I should totally drop that functionality? Or do
> we abstract the FileDialog class in a similar manner that is done w/ the
> AboutAction example? So basically, what do I do about my Open/Save File
> Dialogs? Should they be moved over to exclusively the PROJECT.rcp fragment?
The crux is the file system. The users' (local) file system can't be
accessed, the servers' file system is shared among all
sessions/users. The short answer is yes, all this has to be moved to
the "PROJECT.rcp" fragment.
In some cases the "Save File" action may be substituted by an Upload
widget. "Open File" may also be replaced in some cases, but all this
very much depends on the particular use case.

>
> Q2: What about KeyListeners? I use a dialog that does not allow the
> Finish button to appear unless all 5 fields are completed...is there a
> workaround for this? I know how to do it in traditional web development.
If the "fields" you mention are Text widgets, use ModifyListeners to
set the enablement of the finish button.

>
> Q3: Finally, I have a set of handlers for desktop edit actions (copy,
> paste, select all, etc.) which are obviously unnecessary for RAP, but
> necessary for RCP. Should these handlers be moved to the PROJECT.rcp
yes

> fragment as well? How exactly do fragments work when I want to run the
> entire application (the slides explain how to set up the fragments, but
> not how to integrate them). Could you enlighten us more on this component?
Not sure what you mean by "integrate them".
>
Re: Innoopract Webinar Questions - API Differences [message #112390 is a reply to message #112024] Fri, 14 November 2008 08:03 Go to previous messageGo to next message
Adam is currently offline AdamFriend
Messages: 25
Registered: July 2009
Junior Member
Thanks Rüdiger, that helped a great deal, but I have a few outstanding
issues:

1. Since the .product file has to do with RCP apps I had to move it to my
PROJECT.rcp source folder. The problem is, its broken now and the tutorial
didn't feature a project using a product file...so how do I go about using
a product file in a fragment?

2. The crux of my program revolves around displaying results from a Grappa
panel (the graphics project from IBM that utilizes Java Swing). I was able
to get it to work in RCP with an SWT_AWT bridge, but that's no longer an
option with RAP. Here's the code I have, with the commented code the part
that worked for RCP, and what I had to do to get it to compile in RAP
right below it:

//grappaComposite = new Composite(parent, SWT.EMBEDDED |
SWT.NO_BACKGROUND);
grappaComposite = new Composite(parent, SWT.VIRTUAL);

data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.verticalAlignment = GridData.FILL;
data.horizontalSpan = 6;
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
grappaComposite.setLayoutData(data);

//grappaFrame = SWT_AWT.new_Frame(grappaComposite);
grappaFrame = new Frame();

I need this grappa frame so I can make this call

grappaPanel = v.getBaseGrappaPanel();

which gets a grappa object and is displayed with this code:

final JScrollPane jt = new JScrollPane();
jt.setViewportView(grappa);
grappaFrame.add(jt);
grappaFrame.setVisible(true);

so as you can see, the basic flow is to create the frame/composite to
house the grappa image, call and obtain the image from the database data,
and then set that image into the frame...problem being, without a swt_awt
frame, I have no idea how to accomplish this in RAP.

Sort of long winded...I can explain it again if I need to, but those are
really the only 2 outstanding issues I have.

Thanks again!

Rüdiger Herrmann wrote:

> Adam wrote:
>> Hello,
>>
>> First of all I want to thank all of you who are on the team who put this
>> video/slide/examples together...they have been very useful in turning my
>> RCP application into a fully cross-target application. I do have a
>> question referring to the first API Differences slide:
>>
>> It says "Not all RCP APIs are available in RAP" and lists FileDialog as
>> one, which I am using.
>>
>> Q1: Does this mean that I should totally drop that functionality? Or do
>> we abstract the FileDialog class in a similar manner that is done w/ the
>> AboutAction example? So basically, what do I do about my Open/Save File
>> Dialogs? Should they be moved over to exclusively the PROJECT.rcp fragment?
> The crux is the file system. The users' (local) file system can't be
> accessed, the servers' file system is shared among all
> sessions/users. The short answer is yes, all this has to be moved to
> the "PROJECT.rcp" fragment.
> In some cases the "Save File" action may be substituted by an Upload
> widget. "Open File" may also be replaced in some cases, but all this
> very much depends on the particular use case.

>>
>> Q2: What about KeyListeners? I use a dialog that does not allow the
>> Finish button to appear unless all 5 fields are completed...is there a
>> workaround for this? I know how to do it in traditional web development.
> If the "fields" you mention are Text widgets, use ModifyListeners to
> set the enablement of the finish button.

>>
>> Q3: Finally, I have a set of handlers for desktop edit actions (copy,
>> paste, select all, etc.) which are obviously unnecessary for RAP, but
>> necessary for RCP. Should these handlers be moved to the PROJECT.rcp
> yes

>> fragment as well? How exactly do fragments work when I want to run the
>> entire application (the slides explain how to set up the fragments, but
>> not how to integrate them). Could you enlighten us more on this component?
> Not sure what you mean by "integrate them".
>>
Re: Innoopract Webinar Questions - API Differences [message #112816 is a reply to message #112390] Wed, 19 November 2008 19:39 Go to previous message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Adam wrote:
> Thanks Rüdiger, that helped a great deal, but I have a few outstanding
> issues:
>
> 1. Since the .product file has to do with RCP apps I had to move it to
> my PROJECT.rcp source folder. The problem is, its broken now and the
> tutorial didn't feature a project using a product file...so how do I go
> about using a product file in a fragment?
Why don't you put the .product file in a (RCP only) plug-in instead?

>
> 2. The crux of my program revolves around displaying results from a
> Grappa panel (the graphics project from IBM that utilizes Java Swing). I
> was able to get it to work in RCP with an SWT_AWT bridge, but that's no
> longer an option with RAP. Here's the code I have, with the commented
> code the part that worked for RCP, and what I had to do to get it to
> compile in RAP right below it:
>
> //grappaComposite = new Composite(parent, SWT.EMBEDDED |
> SWT.NO_BACKGROUND);
> grappaComposite = new Composite(parent, SWT.VIRTUAL);
>
> data = new GridData();
> data.horizontalAlignment = GridData.FILL;
> data.verticalAlignment = GridData.FILL;
> data.horizontalSpan = 6;
> data.grabExcessHorizontalSpace = true;
> data.grabExcessVerticalSpace = true;
> grappaComposite.setLayoutData(data);
>
> //grappaFrame = SWT_AWT.new_Frame(grappaComposite);
> grappaFrame = new Frame();
>
> I need this grappa frame so I can make this call
>
> grappaPanel = v.getBaseGrappaPanel();
>
> which gets a grappa object and is displayed with this code:
>
> final JScrollPane jt = new JScrollPane();
> jt.setViewportView(grappa);
> grappaFrame.add(jt);
> grappaFrame.setVisible(true);
>
> so as you can see, the basic flow is to create the frame/composite to
> house the grappa image, call and obtain the image from the database
> data, and then set that image into the frame...problem being, without a
> swt_awt frame, I have no idea how to accomplish this in RAP.
I don't exactly understand what you do with Grappa, but since
currently RAP does not offer an SWT_WAT bridge there is no quick
solution for this.

Depending on how complex/extensive your Grappa usage is, you may
work around it by drawing images on the server side and sending them
to the client as 'static' resources (i.e. using Lables).

>
> Sort of long winded...I can explain it again if I need to, but those are
> really the only 2 outstanding issues I have.
>
> Thanks again!
>
> Rüdiger Herrmann wrote:
>
>> Adam wrote:
>>> Hello,
>>>
>>> First of all I want to thank all of you who are on the team who put
>>> this video/slide/examples together...they have been very useful in
>>> turning my RCP application into a fully cross-target application. I
>>> do have a question referring to the first API Differences slide:
>>>
>>> It says "Not all RCP APIs are available in RAP" and lists FileDialog
>>> as one, which I am using.
>>>
>>> Q1: Does this mean that I should totally drop that functionality? Or
>>> do we abstract the FileDialog class in a similar manner that is done
>>> w/ the AboutAction example? So basically, what do I do about my
>>> Open/Save File Dialogs? Should they be moved over to exclusively the
>>> PROJECT.rcp fragment?
>> The crux is the file system. The users' (local) file system can't be
>> accessed, the servers' file system is shared among all sessions/users.
>> The short answer is yes, all this has to be moved to the "PROJECT.rcp"
>> fragment.
>> In some cases the "Save File" action may be substituted by an Upload
>> widget. "Open File" may also be replaced in some cases, but all this
>> very much depends on the particular use case.
>
>>>
>>> Q2: What about KeyListeners? I use a dialog that does not allow the
>>> Finish button to appear unless all 5 fields are completed...is there
>>> a workaround for this? I know how to do it in traditional web
>>> development.
>> If the "fields" you mention are Text widgets, use ModifyListeners to
>> set the enablement of the finish button.
>
>>>
>>> Q3: Finally, I have a set of handlers for desktop edit actions (copy,
>>> paste, select all, etc.) which are obviously unnecessary for RAP, but
>>> necessary for RCP. Should these handlers be moved to the PROJECT.rcp
>> yes
>
>>> fragment as well? How exactly do fragments work when I want to run
>>> the entire application (the slides explain how to set up the
>>> fragments, but not how to integrate them). Could you enlighten us
>>> more on this component?
>> Not sure what you mean by "integrate them".
>>>
>
>
Previous Topic:Riena Proyect
Next Topic:Server-Push/ asyncExec / java.lang.OutOfMemoryError
Goto Forum:
  


Current Time: Fri Jan 27 02:36:17 GMT 2023

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

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

Back to the top