Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » PageBook on FormDialog
PageBook on FormDialog [message #1458293] Sat, 01 November 2014 03:28 Go to next message
Eclipse UserFriend
Hi RAP Team,

We have a little case where we put SWT Text component on PageBook which
reside on a FormDialog. When focus in on the Text and user presses Enter
key a Widget is disposed exception is thrown.

Below is the snippet:

Button button = toolkit.createButton(container, "PageBook Dialog",
SWT.PUSH);
button.setLayoutData(GridDataFactory.swtDefaults().hint(150,
SWT.DEFAULT).create());

button.addSelectionListener
(
new SelectionAdapter()
{
private static final long serialVersionUID = 8745498441542541616L;

@Override
public void widgetSelected(SelectionEvent e)
{
FormDialog dialog = new FormDialog(container.getShell())
{
private static final long serialVersionUID = -8404073274862848632L;
@Override
protected void createFormContent(IManagedForm managedForm)
{ Composite parent = managedForm.getForm().getBody();
parent.setLayout(GridLayoutFactory.fillDefaults().create());
FormToolkit toolkit = managedForm.getToolkit();
Composite composite = toolkit.createComposite(parent);
composite.setLayout(GridLayoutFactory.fillDefaults().create());
composite.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());

PageBook pageBook = new PageBook(composite, SWT.NONE);
pageBook.setLayout(GridLayoutFactory.fillDefaults().create());
pageBook.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());
toolkit.adapt(pageBook, true, true);
Composite page = toolkit.createComposite(pageBook);
page.setLayout(GridLayoutFactory.fillDefaults().create());
page.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());
Text text = toolkit.createText(page, null);
text.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());

pageBook.showPage(page);
}
};

dialog.open();
}
}
);

If we remove the PageBook all works fine.

Any help would be greatly appreciated.


Regards,
Setya
Re: PageBook on FormDialog [message #1465205 is a reply to message #1458293] Sat, 08 November 2014 01:08 Go to previous messageGo to next message
Eclipse UserFriend
Hi Team,

Anybody can confirm this problem.

I'm on RAP 1.5 and so far unable to reproduce it on RCP.

Regards,
Setya

On 11/01/2014 02:28 PM, Setya wrote:
> Hi RAP Team,
>
> We have a little case where we put SWT Text component on PageBook which
> reside on a FormDialog. When focus in on the Text and user presses Enter
> key a Widget is disposed exception is thrown.
>
> Below is the snippet:
>
> Button button = toolkit.createButton(container, "PageBook Dialog",
> SWT.PUSH);
>
> button.setLayoutData(GridDataFactory.swtDefaults().hint(150,
> SWT.DEFAULT).create());
>
> button.addSelectionListener
> (
> new SelectionAdapter()
> {
> private static final long serialVersionUID = 8745498441542541616L;
>
> @Override
> public void widgetSelected(SelectionEvent e)
> {
> FormDialog dialog = new FormDialog(container.getShell())
> {
> private static final long serialVersionUID = -8404073274862848632L;
> @Override
> protected void createFormContent(IManagedForm managedForm)
> {
> Composite parent = managedForm.getForm().getBody();
> parent.setLayout(GridLayoutFactory.fillDefaults().create());
>
> FormToolkit toolkit = managedForm.getToolkit();
> Composite composite =
> toolkit.createComposite(parent);
> composite.setLayout(GridLayoutFactory.fillDefaults().create());
> composite.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());
>
>
> PageBook pageBook = new PageBook(composite, SWT.NONE);
> pageBook.setLayout(GridLayoutFactory.fillDefaults().create());
> pageBook.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());
>
> toolkit.adapt(pageBook, true, true);
> Composite page =
> toolkit.createComposite(pageBook);
> page.setLayout(GridLayoutFactory.fillDefaults().create());
> page.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());
>
> Text text =
> toolkit.createText(page, null);
> text.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());
>
> pageBook.showPage(page);
> }
> };
>
> dialog.open();
> }
> }
> );
>
> If we remove the PageBook all works fine.
>
> Any help would be greatly appreciated.
>
>
> Regards,
> Setya
Re: PageBook on FormDialog [message #1466602 is a reply to message #1465205] Sun, 09 November 2014 05:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi Setya,
this sounds similar to this bug:
449350: Press keys then escape key fast enough in dialog generates
"Widget is disposed" exceptions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=449350
which we fixed recently in 3.0 master branch. I can't say for sure what
is going on with RAP 1.5 (a lot of changes have been made to RAP since
than), but could be a similar problem.
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: PageBook on FormDialog [message #1466775 is a reply to message #1466602] Sun, 09 November 2014 08:51 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ivan,

Thank you for your information.

So should I file a bug against this ?

Regards,
Setya
Re: PageBook on FormDialog [message #1466874 is a reply to message #1466775] Sun, 09 November 2014 10:53 Go to previous message
Eclipse UserFriend
Can you reproduce it with RAP 3.0?

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Cool new feature: multiple tab support. How do I turn it off?
Next Topic:Nebula Grid missing GridTableViewer and GridTreeViewer
Goto Forum:
  


Current Time: Tue Jul 01 06:15:10 EDT 2025

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

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

Back to the top