Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » PageBook on FormDialog
PageBook on FormDialog [message #1458293] Sat, 01 November 2014 07:28 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 06:08 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 10:24 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 13:51 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 15:53 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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: Fri Apr 26 05:38:46 GMT 2024

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

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

Back to the top