Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » issue regarding FileUpload widget in scrolledcomposite
issue regarding FileUpload widget in scrolledcomposite [message #86237] Tue, 06 May 2008 11:00 Go to next message
Eclipse UserFriend
Originally posted by: dnise.hotmail.com

--nextPart2563158.rV3vtE7lfp
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8Bit

Hi2All:
I met a strange problem when used FileUpload widget.I have created a
ViewPart, added some codes in createParentCOntrol method.In ViewPart,the
parent compsite(not scrolledComposite) only includes fileUpload widget
which has no listener be implemented.It works fine when the viewpart has no
scrolledComposite. in order to add more than one fileupload widget, I have
to use scrolledCompoiste,so I add fileUpload widget in it. also it works
fine when i started the Rap. but After I closed the ViewPart, then open it
again,it shows "Could not evaluate javascript response:" on web page. there
are only a scrolledComposite difference in createParentControl method. is
my code with problem? or FileUpload widget has problem. I am confusing.


my codes as Attachment
UploadViewTest1.java has problems.
UploadViewTest2.java works fine.


reproduce step:
1.open UploadViewTest1
2.close UploadViewTest1
3.open UploadviewTest1 again ("It will show Could not evaluate javascript
response")

can anyone tell me what's wrong with it ?

thanks in adavance



--nextPart2563158.rV3vtE7lfp
Content-Type: text/x-java; name="UploadViewTest1.java"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="UploadViewTest1.java"

package net.heartsome.gms.filemanagement;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.rwt.widgets.Upload;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.part.ViewPart;

public class UploadViewTest1 extends ViewPart {

public final static String ID = "net.heartsome.gms.filemanagement.UploadViewTest1";

List<Widget> uploadList = new ArrayList<Widget>();

@Override
public void createPartControl(Composite parent) {
parent.setLayout(new GridLayout());
ScrolledComposite sc =new ScrolledComposite(parent,SWT.V_SCROLL|SWT.H_SCROLL);
sc.setLayout(new GridLayout());
sc.setLayoutData(new GridData(600,500));
Composite top = new Composite(sc, SWT.NONE);
top.setLayout(new GridLayout());
top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

Composite first = new Composite(top, SWT.NONE);
first.setLayout(new GridLayout());
first.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
final Upload upload1 = new Upload(first, SWT.NONE, "" + "/upload");
upload1.setLayout(new GridLayout());
first.pack();
first.layout();
top.pack();
top.layout();
}
@Override
public void setFocus() {

}

}


--nextPart2563158.rV3vtE7lfp
Content-Type: text/x-java; name="UploadViewTest2 .java"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="UploadViewTest2 .java"

package net.heartsome.gms.filemanagement;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.rwt.widgets.Upload;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.part.ViewPart;

public class UploadViewTest2 extends ViewPart {

public final static String ID = "net.heartsome.gms.filemanagement.UploadViewTest2";

List<Widget> uploadList = new ArrayList<Widget>();

@Override
public void createPartControl(Composite parent) {

Composite top = new Composite(parent, SWT.NONE);
top.setLayout(new GridLayout());
top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

Composite first = new Composite(top, SWT.NONE);
first.setLayout(new GridLayout());
first.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
final Upload upload1 = new Upload(first, SWT.NONE, "" + "/upload");
upload1.setLayout(new GridLayout());
first.pack();
first.layout();
top.pack();
top.layout();
}
@Override
public void setFocus() {

}

}


--nextPart2563158.rV3vtE7lfp--
Re: issue regarding FileUpload widget in scrolledcomposite [message #86267 is a reply to message #86237] Tue, 06 May 2008 14:25 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi,

which code base do you use? Not long ago, client side widget pooling was
enabled for the ScrolledComposite which caused stranged JS-errors.

Please check, if the method ScrolledCompositeLCA#getTypePoolId returns
NULL. If not you may want to change this temporarily and see if the
problem persists.

Regards,
Stefan.

dnise schrieb:
> Hi2All:
> I met a strange problem when used FileUpload widget.I have created a
> ViewPart, added some codes in createParentCOntrol method.In ViewPart,the
> parent compsite(not scrolledComposite) only includes fileUpload widget
> which has no listener be implemented.It works fine when the viewpart has no
> scrolledComposite. in order to add more than one fileupload widget, I have
> to use scrolledCompoiste,so I add fileUpload widget in it. also it works
> fine when i started the Rap. but After I closed the ViewPart, then open it
> again,it shows "Could not evaluate javascript response:" on web page. there
> are only a scrolledComposite difference in createParentControl method. is
> my code with problem? or FileUpload widget has problem. I am confusing.
>
>
> my codes as Attachment
> UploadViewTest1.java has problems.
> UploadViewTest2.java works fine.
>
>
> reproduce step:
> 1.open UploadViewTest1
> 2.close UploadViewTest1
> 3.open UploadviewTest1 again ("It will show Could not evaluate javascript
> response")
>
> can anyone tell me what's wrong with it ?
>
> thanks in adavance
>
>
>
Re: issue regarding FileUpload widget in scrolledcomposite [message #86380 is a reply to message #86267] Wed, 07 May 2008 01:25 Go to previous message
Eclipse UserFriend
Originally posted by: dnise.hotmail.com

HI:
Thanks for your reply.Now I used Rap 1.1 M3 version.
I used the old version,it works fine. is it ScrolledComposite wrong?
I'll get the latest released,then try it.
Previous Topic:I can not find theme-template.properties
Next Topic:RAP equivalent for IElementFactory/IMemento ??
Goto Forum:
  


Current Time: Thu Dec 26 23:14:12 GMT 2024

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

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

Back to the top