|
|
|
|
|
|
Re: Browser widget problem [message #1037163 is a reply to message #1036828] |
Tue, 09 April 2013 08:28 |
|
Dmitry,
the snippet below works for me. Maybe the problem is only reproducible
on a Windows filesystem? If you can reproduce the problem with a snippet
like this, then please open a bug.
Regards, Ralf
public class BrowserSnippet extends AbstractEntryPoint {
@Override
public void createContents( Composite parent ) {
parent.setLayout( new GridLayout() );
final Browser browser = new Browser( parent, SWT.BORDER );
browser.setText( "Empty" );
browser.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true
) );
Button button = new Button( parent, SWT.PUSH );
button.setText( "change content" );
button.addListener( SWT.Selection, new Listener() {
@Override
public void handleEvent( Event event ) {
browser.setText( "Some other text " + UUID.randomUUID() );
}
} );
}
}
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
|
Re: Browser widget problem [message #1042287 is a reply to message #1041982] |
Tue, 16 April 2013 08:16 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Dmitry,
the posted code works for me with RAP from master (2.1M1). Which RAP
version are you using? What is your OS, JDK (x64?)? Does it happen when
you start the application from IDE (Jetty) or you are deploying it to an
external servlet container as Tomcat?
Best,
Ivan
On 4/16/2013 12:14 AM, Dmitry Dukhov wrote:
> This is simple code with browser's problem.
>
> First code works correctly.
>
> run new ViewAlerts().show(parentGrp) again and upssss "The requested
> operation cannot be performed on a file with a user-mapped section open"
>
>
>
> public class ViewAlerts {
>
>
> public ViewAlerts() {
> }
>
> protected Composite viewHistory(final Composite parentTab) {
>
> Composite grpBrowser = new Composite(parentTab, SWT.BORDER);
> GridData data = new GridData(GridData.FILL_HORIZONTAL |
> GridData.FILL_VERTICAL);
> data.heightHint = 250;
> grpBrowser.setLayoutData(data);
> grpBrowser.setLayout( new FillLayout() );
>
> Browser browser = new Browser(grpBrowser, SWT.BORDER);
> browser.setText("Emty");
> browser.setText( "A report??" ); return grpBrowser;
> }
>
> public void show(Composite parent) {
> TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
>
> TabItem tabHistory = new TabItem(tabFolder, SWT.NONE);
> tabHistory.setText("History of alerts");
> tabHistory.setControl(viewHistory(tabFolder));
> }
>
> }
>
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04806 seconds