|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: FileChooser in RAP [message #1366475 is a reply to message #1354486] |
Mon, 19 May 2014 06:25  |
Eclipse User |
|
|
|
Hi Marco,
Before I have a deeper look into your problem, can you please confirm first that you're using a plain installation of Eclipse Scout Juno SR2 [1]? Have you made any changes to your Eclipse installation by using the "Install New Software..." menu?
The ScoutRAP.target initially includes all the bundles that are located in your local Eclipse Scout installation directory which are included with
<location path="${eclipse_home}\" type="Directory"/>
<location path="${eclipse_home}\rap_target" type="Directory"/>
All Scout bundles for SWT/Swing and also for RAP (second entry) are set for the target platform.
Since the Scout RAP Filechooser is not included in the Eclipse package (because the RAP fileupload widget is still in incubation phase), you need to include the P2 update site for this widget directly. So your ScoutRAP.target file should look like
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="ScoutRAP" sequenceNumber="1">
<locations>
<location path="${eclipse_home}\" type="Directory"/>
<location path="${eclipse_home}\rap_target" type="Directory"/>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rap.incubator.supplemental.fileupload.feature.feature.group" version="1.5.0.20120220-1720"/>
<repository location="http://download.eclipse.org/rt/rap/1.5/incubator"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.scout.rt.ui.rap.incubator.filechooser.feature.feature.group" version="3.8.2.201302111336"/>
<repository location="http://download.eclipse.org/scout/releases/3.8"/>
</location>
</locations>
<launcherArgs>
<vmArgs>-Xms256m -Xmx512m -XX:MaxPermSize=256m</vmArgs>
</launcherArgs>
</target>
If you use the Scout SDK checkbox "RAP FileChooser Support (Incubation)", these P2 update sites will automatically be included.
In your *.product files, you need to add the bundles
<plugin id="org.apache.commons.fileupload"/>
<plugin id="org.apache.commons.io"/>
<plugin id="org.eclipse.rap.rwt.supplemental.filedialog"/>
<plugin id="org.eclipse.rap.rwt.supplemental.fileupload"/>
<plugin id="org.eclipse.scout.rt.ui.rap.incubator.filechooser"/>
(this step is also done automatically if you install the FileChooser via Scout SDK.
Now, to your actual problem:
AbstractFileChooserField contains a configuration method
protected boolean getConfiguredTypeLoad() {
return false;
}
that returns false by default. Depending on this configuration, a different field will be created in RAP (see FileChooserFieldFactory [2]).
What you probably want is to have the RwtScoutFileUploadField which allows you to upload files from your client to the Scout RAP server. Therefore, you need to override the method type load:
public class MyFileUploadField extends AbstractFileChooserField {
@Override
protected String getConfiguredLabel() {
return TEXTS.get("MyFileUpload");
}
@Override
protected boolean getConfiguredTypeLoad() {
return true;
}
}
Does that solve your problem?
[1] https://www.eclipse.org/downloads/packages/eclipse-scout-developers/junosr2
[2] https://dev.eclipse.org/svnroot/technology/org.eclipse.scout/scout.rt.incubator/branches/3.8/org.eclipse.scout.rt.ui.rap.incubator.filechooser/src/org/eclipse/scout/rt/ui/rap/form/fields/filechooserfield/FileChooserFieldFactory.java
[Updated on: Mon, 19 May 2014 06:27] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.49081 seconds